sync-import
v0.0.3
Published
Synchronous import of modules for SystemJS
Downloads
13
Readme
Allows SystemJS users to syncronously import a pre-bundled module. It achieves this by using the synchronous-inspection feature of Bluebird together with a forced synchronous-resolution mechanism that we add ourselves.
The upshot of this is that, whereas you might normally import a module with SystemJS like this:
var System = require('systemjs');
System.import('some-module').then(function(m) {
console.log(m);
});
you can instead write synchronous code like this:
var syncImport = require('sync-import');
var m = syncImport('some-module');
console.log(m);