-
Notifications
You must be signed in to change notification settings - Fork 393
feat!(create): upgrade default browser targets #7147
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
base: main
Are you sure you want to change the base?
Conversation
|
✅ Deploy Preview for modernjs-byted ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
6c534a0
to
a8c9051
Compare
...ages/document/main-doc/docs/en/guides/advanced-features/page-performance/optimize-bundle.mdx
Show resolved
Hide resolved
See discussion in web-infra-dev/rspack#10290 for info
I think the default values of browserslist provided by Modern.js and Rspack should be different. Modern.js should consider the compatibility requirements of enterprise users such as ByteDance. @zllkjc might be able to help evaluate the current goals of Modern.js for browser compatibility. |
I disagree in two places
Also, my earlier comment about Vite is useful here web-infra-dev/rspack#10290 (comment) |
Here's my opinion:
|
I think it's important to clarify my stance: I'm not claiming Modern.js should be on the bleeding edge and only support a tiny subset of browsers in order to get the newest features. I agree that the default should be conservative. Modern.js by default should only support features that are widely available and target browsers that are ubiquitous and go back years. The current defaults are stagnant on the verge of paranoia. Supporting browsers from 2016 (not devices from 2016, because those browsers were still updated for years; we're probably talking devices from 2012) goes against the philosophy of Modern.js. The great thing about Modern.js is that it has good defaults, but gives users the ability to tweak things however they like with the great power of Rsbuild and Rspack. If some project needs to support IE9, they can customize their build to make that work. The vast vast majority of projects don't. tl;dr: I agree that Modern.js should be conservative in its browser choice to support the widest range of users. But are we going too far?
My hypothesis is that Next.js did the same thing as Vite. Claim to be "modern" but actually just picked the most modern and widely supported browsers when it was released. Even still, their defaults are much newer than ours.
Exactly. That's why it's the goal of Modern.js to have good defaults and make it easy for users to customize it to their liking. Again, if we have to paranoidly support every use case should we make IE support default? The current default goes back to 2016. We're not disagreeing on whether or not Modern.js by default should support the most devices. 2016
This is a good counterpoint. I have a few thoughts:
|
By the way, can we please acknowledge that the current behavior when devs decide not to use a |
Thank you for your explanation~ I agree with what you said, we should keep the template as modern as possible. But I always think stability is the most important thing. Once the template is created, unless the developer manually changes it, it shouldn't change its compatibility at any time. Creating dynamic templates is a good suggestion, and it's more stable than using the dynamic version of Browsers. This can be applied in Modern.js, but in Bytedance, I need to do more research, and I can't give a conclusion now. |
Agreed! New ByteDance projects by default can support widely available browsers. Again, we're talking about browsers that 99.5% of people use. If there's a new project that needs to support a ten-year old browser they can easily update the config to do that. |
See discussion in web-infra-dev/rspack#10290 for info