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

Avoid non-identifier export names in non-entry library bundles #9587

Merged
merged 2 commits into from
Mar 18, 2024

Conversation

devongovett
Copy link
Member

Followup from #9489 (comment). It turns out that webpack 4 doesn't support parsing string export syntax, and it is still pretty widely used, so we should try to avoid this. This PR strikes a balance: it will still export non-identifier symbols if the CJS module was an entry (since the author probably has control over this) but it will avoid it for internal bundles where we already only use the default export to import the namespace anyway. This passes our existing test and fixes the cases we need for React Spectrum.

@devongovett devongovett requested a review from mischnic March 18, 2024 15:34
@devongovett devongovett merged commit 15b78e1 into v2 Mar 18, 2024
14 of 16 checks passed
@devongovett devongovett deleted the avoid-non-identifier-exports branch March 18, 2024 16:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants