3 ms·
The module standard that is present in ES6 is a very different beast than CommonJS
by dcherman 10y ago
The module standard that is present in ES6 is a very different beast than CommonJS
- jnbiche 10y agoAgreed. I use ES6 modules regularly (via Babel compiled to CommonJS, and also Rollup). Unlike CommonJS, ES6 modules have the advantage (and disadvantage) of being statically resolved, which permits tree-shaking (but denies dynamic resolution of imports like CommonJS). The "that" in my sentence refers to "module system", not "CommonJS", but I agree my sentence was unclear.
- jnbiche 10y agoMore specifically: in the next major Node.js release (v7.0.0), ES6 modules will be implemented. That's what I was trying to say.