Skip to content

Commit

Permalink
fix(systemjs): export named from destructuring object (#14655)
Browse files Browse the repository at this point in the history
  • Loading branch information
underfin committed Jun 10, 2022
1 parent baf988e commit 1e08968
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 1 deletion.
Expand Up @@ -190,7 +190,7 @@ export default declare<PluginState>((api, options: Options) => {
return;
}
const exportedNames = this.exports[name];
if (!exportedNames) return;
if (!exportedNames) continue;
for (const exportedName of exportedNames) {
exprs.push(
this.buildCall(exportedName, t.identifier(name)).expression,
Expand Down
@@ -0,0 +1,3 @@
const { foo: bar, baz } = {};

export { baz }
@@ -0,0 +1,14 @@
System.register([], function (_export, _context) {
"use strict";

var bar, baz;
return {
setters: [],
execute: function () {
({
foo: bar,
baz
} = {}), _export("baz", baz);
}
};
});

0 comments on commit 1e08968

Please sign in to comment.