-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
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
String.prototype.replaceAll polyfill is not included #7449
Comments
The repro doesn't look like a complete reproduction with browserlist and |
thank you @bluwy , it seems I forgot to add the |
Maybe you need to set |
@sapphi-red I see that it is not recommended as it will include a big chunk, so I wonder why it can't do same autodetection and only include polyfills for the methods that are used, looking into the browser list for the targeting browsers |
It does do auto detection. But because core-js cares many edge cases, it leads to including many polyfills. For example, this project (which you provided for reproduction) will include the following polyfills.
A compat data of It seems like there is a edge case bug with Safari <13.1 and |
I see, it seems the best idea to set |
I close this issue because I think it is solved. |
Describe the bug
Hello.
We use '@vitejs/plugin-legacy' to create legacy build and also include polyfills for our modern browsers. We use
String.prototype.replaceAll
method in our application, but we still miss its polyfill for the modern browsers, though our browserlist query includes modern browsers which do not havereplaceAll
implementationReproduction
https://stackblitz.com/edit/vitejs-vite-pzezqt
System Info
Used Package Manager
yarn
Logs
No response
Validations
The text was updated successfully, but these errors were encountered: