4 ms·
Instead of Babel, you might want to look at Rollup.js for ES6 module support. [1] You can have Rollup spit out CommonJS require commands for things that aren't
by SomeCallMeTim 10y ago
Instead of Babel, you might want to look at Rollup.js for ES6 module support. [1]
You can have Rollup spit out CommonJS require commands for things that aren't part of your project, or you can use rollup-plugin-commonjs to wrap your entire app into one big bundle, including the CommonJS includes.
And as much faster as Node 6 has gotten with module importing, it almost can't be as fast as Rollup's module loader, which is more optimal than Browserify and WebPack, in that ES6 modules don't even get wrapped in "requires", but instead included inline. It just parses the code to ensure no variable names collide.
[1] http://rollupjs.org http://rollupjs.org