-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Closed
Labels
p3-minor-bugAn edge case that only affects very specific usage (priority)An edge case that only affects very specific usage (priority)plugin: legacy
Description
Describe the bug
The default value of modernTargets is edge >= 80, firefox >= 72, chrome >= 80, safari >= 13.1, chromeAndroid >= 80, iOS >= 13.1.
For example, if my .browserslistrc is chrome > 63, then I used Promise.allSettled (available in Chrome >= 76).
Following the build process, if you attempt to open it in Chrome versions 64 to 79, you will encounter the error Uncaught TypeError: Promise.allSettled is not a function, as polyfills are not generated for these versions.
You must manually set modernTargets to chrome > 63 for it to work properly. It's confusing.
Reproduction
https://stackblitz.com/edit/vitejs-vite-67qumq
Steps to reproduce
No response
System Info
Browsers:
Chrome: 74.0.3729.131
npmPackages:
@vitejs/plugin-legacy: ^5.3.2 => 5.3.2
vite: ^5.2.7 => 5.2.7Used 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 vuejs/core 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
p3-minor-bugAn edge case that only affects very specific usage (priority)An edge case that only affects very specific usage (priority)plugin: legacy