Thanks for your comment. The code is pure ES6 syntax (no post-process, no frame-work). The use of webpack + babel is just there to make it work on browser. It feels vanilla to me. How would you have done ?
The thing is, this would not work, either in Node, you would need to name it .jsm and run it in Node 8 LTS, nor in most browsers.
.jsm
Node use another syntax to uses modules, and I think only Chrome supports import/export modules.
So, for now, you need to compile now. I think that's what Elarcis means.
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Thanks for your comment. The code is pure ES6 syntax (no post-process, no frame-work). The use of webpack + babel is just there to make it work on browser. It feels vanilla to me. How would you have done ?
The thing is, this would not work, either in Node, you would need to name it
.jsm
and run it in Node 8 LTS, nor in most browsers.Node use another syntax to uses modules, and I think only Chrome supports import/export modules.
So, for now, you need to compile now. I think that's what Elarcis means.