Skip to content
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] The default value of the modernTargets does not support all target browsers #16360

Closed
7 tasks done
Fitz6 opened this issue Apr 5, 2024 · 1 comment · Fixed by #16367
Closed
7 tasks done
Labels
p3-minor-bug An edge case that only affects very specific usage (priority) plugin: legacy

Comments

@Fitz6
Copy link

Fitz6 commented Apr 5, 2024

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.7

Used Package Manager

npm

Logs

No response

Validations

Copy link

stackblitz bot commented Apr 5, 2024

Fix this issue in StackBlitz Codeflow Start a new pull request in StackBlitz Codeflow.

@sapphi-red sapphi-red added plugin: legacy p3-minor-bug An edge case that only affects very specific usage (priority) labels Apr 6, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Apr 24, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
p3-minor-bug An edge case that only affects very specific usage (priority) plugin: legacy
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants