Merge pull request #4789 from guybedford/system-dynamic-import

Support import() as contextual import in system module format
This commit is contained in:
Henry Zhu
2016-11-14 18:00:06 -05:00
committed by GitHub
5 changed files with 38 additions and 1 deletions

View File

@@ -0,0 +1,6 @@
export function lazyLoadOperation () {
return import('./x')
.then(function (x) {
x.y();
});
}

View File

@@ -0,0 +1,16 @@
System.register([], function (_export, _context) {
"use strict";
function lazyLoadOperation() {
return _context.import('./x').then(function (x) {
x.y();
});
}
_export('lazyLoadOperation', lazyLoadOperation);
return {
setters: [],
execute: function () {}
};
});

View File

@@ -0,0 +1,3 @@
{
"plugins": ["external-helpers", "syntax-dynamic-import", "transform-es2015-modules-systemjs"]
}