Universal dynamic module loader
Universal dynamic module loader - loads ES6 modules, AMD, CommonJS and global scripts in the browser and NodeJS.
System.registerbundle format for production, maintaining circular references support.
~19KB minified and gzipped, runs in IE8+ and NodeJS.
For discussion, join the Gitter Room.
The above will support loading all module formats, including ES Modules transpiled into the System.register format.
To load ES6 code with in-browser transpilation, configure one of the following transpiler plugins:
SystemJS relies on
Promise being present in the environment.
Otherwise, when Promise is not available, SystemJS will attempt to load the
system-polyfills.js file located in the dist folder which contains the when.js Promise polyfill.
To load modules in NodeJS, install SystemJS with:
npm install systemjs
If transpiling ES6, also install the transpiler plugin, following the instructions from the transpiler project page.
We can then load modules equivalently to in the browser:
var SystemJS = ;// loads './app.js' from the current directorySystemJS;
If you are using jspm as a package manager you will also need to load the generated configuration.
The best way to do this in node is to get your
System instance through jspm, which will automatically load your config correctly for you:
var Loader = Loader;var SystemJS = ;SystemJS;
Supported loader plugins:
To install the dependencies correctly, run
bower install from the root of the repo, then open
test/test.html in a browser with a local server
or file access flags enabled.