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
Expand Up @@ -1481,7 +1481,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.