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

Bump default build.target #19358

Open
4 tasks done
sapphi-red opened this issue Feb 5, 2025 · 5 comments
Open
4 tasks done

Bump default build.target #19358

sapphi-red opened this issue Feb 5, 2025 · 5 comments
Labels
breaking change p3-significant High priority enhancement (priority)
Milestone

Comments

@sapphi-red
Copy link
Member

Description

The current default build.target is a bit outdated.

es2020
edge88
firefox78
chrome87
safari14

The reasons why this should be bumped:

Suggested solution

I propose bumping the target to:

es2021
edge91
firefox79
chrome91
safari14

this allows optional chaining and logical assignments to be kept as-is.
Maybe it can be bumped further more, but I think we should bump to this range at least.

I also propose renaming the special 'modules' target to 'defaults' as it has been used as a default / recommended rather than the modules target (chrome60,firefox60,safari11).

Alternative

No response

Additional context

No response

Validations

@patak-dev patak-dev added this to the 7.0 milestone Feb 5, 2025
@github-project-automation github-project-automation bot moved this to Discussing in Team Board Feb 5, 2025
@patak-dev patak-dev added the p3-significant High priority enhancement (priority) label Feb 5, 2025
@patak-dev patak-dev moved this from Discussing to Has plan in Team Board Feb 5, 2025
@sapphi-red
Copy link
Member Author

In the last meeting, we concluded that it would be nice to align with Baseline.

For each major version, Vite will update the default build.target to the browser list used to generate "Baseline Widely available" (the browsers released at least 2.5 years ago).
For example, if Vite 7 were released in May 2025, the default build.target will be:

  • Safari 15.6
  • Chrome 104
  • Edge 104
  • Firefox 104

@nulladdict
Copy link
Contributor

I feel like aligning with baseline is a great move

But please don't rename 'modules' target to 'defaults', because 'defaults' has a pretty strong meaning in the browserslist ecosystem which would add to the confusion around browserslist support

@sapphi-red
Copy link
Member Author

please don't rename 'modules' target to 'defaults', because 'defaults' has a pretty strong meaning in the browserslist ecosystem

Ah, that's a good point. I think 'widely-available' or something that indicates that it aligns with the "Baseline Widely available" would be good.

@patak-dev
Copy link
Member

Maybe it could be called 'baseline'?

@Tamas-hi
Copy link

Tamas-hi commented Mar 23, 2025

I also think this is a good idea.

I'd just combine the last two suggestions - baseline-widely-available helps me instantly understand the exact target.
It's specific enough without being too verbose.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change p3-significant High priority enhancement (priority)
Projects
Status: Has plan
Development

No branches or pull requests

4 participants