3 ms·
The ES6 Conundrum
- WorldMaker 11y agoAn interesting summary. One of the things I think is missing is the bridge that ES6 modules provide: within an ES6 module you can obviously presume access to the ES6 syntax. System.js provides a polyfill for ES6' System loader (and a configurator/value add on top of a browser ES6 System implementation) allowing you to bootstrap into your ES6 modules. It feature detects and uses Babel/Traceur/TypeScript (your choice) to load ES6 modules, if needed. (It also loads CommonJS and AMD and traditional "global" modules because there is a diverse ecosystem of module formats out there.) JSPM is a further value add on top of System.JS that is a package manager that automates configuring System.JS for a complex ecosystem of versioned package repositories (JSPM registry, NPM registry, and even GitHub repository tags), and grabs local development copies for everything (and supports an HTTP/2 CDN in beta-ish) and helps automate using the System.JS bundler if you want to bundle everything into a single minified file. This is a pretty good stack for working with ES6 today, and as browsers start to support ES6 natively it will transition right along. (System.JS will still be useful itself for its plugin/configuration work, including support AMD/CommonJS/global modules in ES6.)