Skip to content

Commit

Permalink
feat: support { "some imports" as "some exports" } in systemjs
Browse files Browse the repository at this point in the history
  • Loading branch information
JLHwung committed Sep 30, 2020
1 parent 49208b9 commit f71402b
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 1 deletion.
Expand Up @@ -519,7 +519,11 @@ export default declare((api, options) => {
);
exportNames.push(exportedName);
exportValues.push(
t.memberExpression(t.identifier(target), node.local),
t.memberExpression(
t.identifier(target),
node.local,
t.isStringLiteral(node.local),
),
);
} else {
// todo
Expand Down
@@ -0,0 +1 @@
export { "some imports" as "some exports" } from "foo";
@@ -0,0 +1,10 @@
System.register(["foo"], function (_export, _context) {
"use strict";

return {
setters: [function (_foo) {
_export("some exports", _foo["some imports"]);
}],
execute: function () {}
};
});
@@ -0,0 +1 @@
export { "some exports" } from "foo";
@@ -0,0 +1,10 @@
System.register(["foo"], function (_export, _context) {
"use strict";

return {
setters: [function (_foo) {
_export("some exports", _foo["some exports"]);
}],
execute: function () {}
};
});

0 comments on commit f71402b

Please sign in to comment.