Skip to content

Commit

Permalink
Register symbols even without scopehoisting (#7222)
Browse files Browse the repository at this point in the history
  • Loading branch information
mischnic committed Nov 16, 2021
1 parent cacdf67 commit 46fe00f
Show file tree
Hide file tree
Showing 16 changed files with 1,474 additions and 937 deletions.
4 changes: 3 additions & 1 deletion packages/core/core/src/BundleGraph.js
Expand Up @@ -1491,7 +1491,9 @@ export default class BundleGraph {
if (!resolved) continue;
let exported = this.getExportedSymbols(resolved, boundary)
.filter(s => s.exportSymbol !== 'default')
.map(s => ({...s, exportAs: s.exportSymbol}));
.map(s =>
s.exportSymbol !== '*' ? {...s, exportAs: s.exportSymbol} : s,
);
symbols.push(...exported);
}
}
Expand Down
@@ -0,0 +1,4 @@
import {foo} from 'bar';
const { bar } = require("bar");

export default foo(2) + bar();
@@ -0,0 +1,3 @@
import {foo} from 'bar';

export default foo(2);

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 46fe00f

Please sign in to comment.