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

fix: Polyfill instancing bug #220

Merged
merged 1 commit into from
Nov 5, 2021
Merged

fix: Polyfill instancing bug #220

merged 1 commit into from
Nov 5, 2021

Conversation

guybedford
Copy link
Owner

Resolves #219.

This was a result of the performance enhancement in #208 which stopped doing fine-grained polyfilling on a per-module basis, and instead duplicates module loads between pure native and pure polyfill modes.

The logic wasn't quite right on one of the codepaths, which has been updated based on the new principle that a top-level <script type="module"> tag will be assigned to either the native loader or the polyfill loader (and the polyfill loader will always apply when the native loader fails). This does still mean that native modules that succeed in polyfill mode will not share dependency instances with polyfilled modules, and this remains an instancing footgun, but at least it is one we can reason about.

@guybedford guybedford merged commit 77020fd into main Nov 5, 2021
@guybedford guybedford deleted the polyfill-instancing-bug branch November 5, 2021 00:53
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.

Dynamic import breaks object identity
1 participant