-
-
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
plugin-legacy doesn't work #7940
Comments
|
@sapphi-red I config the plugin-legacy as below, but it still doesn't work, I just want to add the replaceAll polyfill
|
@guguji5 You need to change export default defineConfig({
plugins: [
legacy({ targets: ['Chrome 63'], modernPolyfills: ['es.string.replace', 'esnext.string.replace-all'], polyfills: ['es.string.replace', 'esnext.string.replace-all'] }),
],
build: {
target: 'chrome63',
}
} |
@sapphi-red it works as expect, thank you |
Describe the bug
I set
build: {polyfillModulePreload: true,target: 'chrome58'}
in vite.config.ts, butTypeError: a.replaceAll is not a function
throw at chrome84.Reproduction
https://github.com/n9e/fe-v5
System Info
Used Package Manager
npm
Logs
Validations
The text was updated successfully, but these errors were encountered: