-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Closed as not planned
Closed as not planned
Copy link
Labels
cannot reproduceThe bug cannot be reproducedThe bug cannot be reproducedpending triageplugin: legacy
Description
Describe the bug
For older browsers with IE 11 support generated file polyfills-legacy.[hash].js should not contain use strict directive, but it does.
It is required by polyfill regenerator-runtime/runtime which contains a comment: This module should not be running in strict mode, ... (https://github.com/facebook/regenerator/blob/main/packages/runtime/runtime.js#L736)
Because the built-in file contains use strict, it will result in an error.
Even if I have set
rollupOptions: {
output: {
strict: false // no strict mode, ... but maybe Rollup is wrong, I am not sure
}
},
Reproduction
https://stackblitz.com/edit/vite-v5p4en
System Info
System:
OS: Linux undefined
CPU: (4) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
Memory: 0 Bytes / 0 Bytes
Shell: Unknown - /bin/jsh
Binaries:
Node: 14.16.0 - /usr/local/bin/node
Yarn: 1.22.10 - /bin/yarn
npm: 7.17.0 - /bin/npm
npmPackages:
@vitejs/plugin-legacy: ^1.6.4 => 1.6.4
vite: ^2.6.0 => 2.7.10Used Package Manager
npm
Logs
No response
Validations
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to https://github.com/vuejs/vue-next instead.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
- The provided reproduction is a minimal reproducible example of the bug.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
cannot reproduceThe bug cannot be reproducedThe bug cannot be reproducedpending triageplugin: legacy