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

runtime.js should read Symbol values dynamically #560

Open
matthieusieben opened this issue May 9, 2022 · 1 comment
Open

runtime.js should read Symbol values dynamically #560

matthieusieben opened this issue May 9, 2022 · 1 comment

Comments

@matthieusieben
Copy link

matthieusieben commented May 9, 2022

runtime.js currently caches the values of Symbol.iterator, Symbol.asyncIterator and Symbol.toStringTag when it is loaded (here).

This can cause issues when regenerator-runtime is loaded before the Symbol polyfills. Here is an example of Babel build that fails running on IE11 due to the order of the imports:
Capture d’écran 2022-05-09 à 13 54 23

I did create an issue in Babel's repository. However, since regenerator is used by more than just Babel, and that this behavior can also affect other tools, I believe it would be better for regenerator-runtime to read the Symbol values wen invoked rather than when loaded. What do you think ?

@nyngwang
Copy link

I hope someone can fix this soon.

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

No branches or pull requests

2 participants