I have seriously come to really like the new features that come with ES6+ Javascript such as async/await
, the new class
syntax, let
and const
(screw you hoisting
!), arrow functions
, destructuring
, the new import
syntax, and many more. These features are seriously useful. I think that the import
syntax in particular makes Node.JS feel so much more like it was made for Javascript.
Ok. Ok. I’ll get on with it—How can I use ES6+ with Node.JS? It’s super simple.
If you are using nodemon
, you can just run nodemon -r esm {THE FILE}
.
Top comments (0)