4 ms·
The best part will be when we're all standardized on ES2015 modules instead of commonJS modules. I agree with you that CommonJS requires are nice to use, but si
by rpeden 10y ago
The best part will be when we're all standardized on ES2015 modules instead of commonJS modules. I agree with you that CommonJS requires are nice to use, but since they're not statically analyzable the way ES2015 imports are, optimizing compilers like the Closure Compiler can't really analyze your entire application, including its dependencies.
Once we've completely made the ES2015 transition (at least for front end modules), we might be in a position to see some really great front end tooling.
- erlich 10y agoYeh I initially hated that commonjs was not used for es2015 imports. Slowed down application startup and lack of node.js compatibility. But after reading the justification it will be better in the long run. We just need some way to lazy load modules.