We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
现在,现代浏览器的polyfills只能基于 { esmodules: true },不能自定义,希望新增一个参数来自定义。
{ esmodules: true }
添加一个modernTargets参数,传给@vitejs/plugin-legacy,如:
modernTargets
@vitejs/plugin-legacy
legacy({ targets: ['chrome 87', 'safari 13', 'firefox 78', 'edge 88'], modernPolyfills: true, modernTargets: { browsers: [ // 'defaults', 'chrome 87', 'safari 13', 'firefox 78', 'edge 88' ] } })
插件代码如:
await detectPolyfills(raw, { esmodules: !options.modernTargets, ...options.modernTargets }, modernPolyfills);
No response
The text was updated successfully, but these errors were encountered:
Duplicate of #6922?
Sorry, something went wrong.
Oh, yes!i close this.
No branches or pull requests
Description
现在,现代浏览器的polyfills只能基于
{ esmodules: true }
,不能自定义,希望新增一个参数来自定义。Suggested solution
添加一个
modernTargets
参数,传给@vitejs/plugin-legacy
,如:插件代码如:
Alternative
No response
Additional context
No response
Validations
The text was updated successfully, but these errors were encountered: