Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Register symbols even without scopehoisting #7222

Merged
merged 14 commits into from
Nov 16, 2021
4 changes: 3 additions & 1 deletion packages/core/core/src/BundleGraph.js
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import {foo} from 'bar';
const { bar } = require("bar");

export default foo(2) + bar();
Original file line number Diff line number Diff line change
@@ -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.

Loading