-
-
Notifications
You must be signed in to change notification settings - Fork 27k
Stable ES features are not always polyfilled when needed #8875
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
Stable ES features are not always polyfilled when needed #8875
Comments
I believe the issue is a mismatch between the core-js dependency version: core-js recommends specifying the minor version in the preset-env options: This description matches the behavior seen in this issue, and a local edit of the babel preset in The easy solution is to change the preset-env option to specify the minor version, both |
This would close #8779 too :) |
This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in 5 days if no further activity occurs. |
This issue has been automatically closed because it has not had any recent activity. If you have a question or comment, please open a new issue. |
Describe the bug
Even with
import 'react-app-polyfill/stable'
, some stable ES features are not polyfilled, such asString#matchAll
.Even importing
String#matchAll
directly from core-js does not work:import 'core-js/stable/string/match-all'
https://caniuse.com/#feat=mdn-javascript_builtins_string_matchall
Steps to reproduce
(Write your steps here:)
yarn create react-app polyfill-bug cd polyfill-bug yarn add react-app-polyfill
Expected behavior
Polyfill for stable ES features should be part of the bundle when importing
react-app-polyfill/stable
.In the case it isn't, explicitly importing the polyfill for the feature should work.
The text was updated successfully, but these errors were encountered: