Not all es6 features are implemented and they are behind the flag and in the experimentation, you have to use the .mjs extension to use it.
The latest v10 will have it all the features in it including the dynamic imports. But v10 still won't be the LTS version and not everyone will be using it.
My point is that you don't need Babel to use modern ES6 features. If you could tell me which ES6 feature you are getting by using Babel. If you are talking about ESM (EcmaScript Modules), Babel doesn't really give you ESM it simply allows you to write the import x from y style and transpiles it back to CJS.
Not all es6 features are implemented and they are behind the flag and in the experimentation, you have to use the
.mjs
extension to use it.The latest v10 will have it all the features in it including the dynamic imports. But v10 still won't be the LTS version and not everyone will be using it.
My point is that you don't need Babel to use modern ES6 features. If you could tell me which ES6 feature you are getting by using Babel. If you are talking about ESM (EcmaScript Modules), Babel doesn't really give you ESM it simply allows you to write the
import x from y
style and transpiles it back to CJS.I'm using Node 10.16.0. Is ESM best way to enable ES6 for NodeJS? (I currently use 'nodemon -r esm')
thanks!