Unfortunately my knowledge of JavaScript
module loaders is still growing and I'm trying to understand their relationship to the new ES6 Modules
. As far as I can tell using a module loader like CommonJS
or RequireJS
using ES5
compliant JavaScript
really needed the use of an asynchronous module loader to increase performance and load only as needed using the respective module loader's syntax.
However looking at the ES6
module documentation and reading other information, it appears to me that module loading is natively supported via the import
and export
keywords. If this is the case am I correct that ES6 JS modules
natively support asynchronous module loading and therefore I do not need to use an additional tool like CommonJS
or RequireJS
?
import
/export
statements aren't officially supported in browsers/node etc yet, but are supported with transpilers like Babel (developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/…) – Eck