-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
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
"modern" mode #1465
Comments
That would be awesome! 😻 |
This will definitely push the boundary! Last year we did the experiment in one of our project with average UV of ten thousands. It's been great, along with lots of pitfalls though. By the time AFAIK, no other companies in China had ever thought of doing so. Later we pushed the solution to our most important project. And it went well since then. Currently we are planning a bigger move. Possibilities are out there. |
@myst729 please test and review the feature for any particular pitfalls you have run into! |
This is great and solves me a lot of headaches! |
@yyx990803 Is it possible to build only on es2015/modern mode? Without build 2x times.. one for legacy and another for modern? with angular-cli@8, it is possible changing browserslist file. I changed browserlistrc to list only moderns browsers, but don't work. .browserslistrc:
|
Insofar as...? |
continued to generate two separate builds, modern and legacy. |
Oh, so you changed the browserslist and applied the changing the browserslist to cover only modern browsers will make webpack build a bundle that contains only modern mode without the And any additional "trickery" that "modern mode" does, i.e. changing the modern bundle's |
I'd still like to be able to trigger them separately without having to adjust browserslist. The main reason is my CI/CD deployment container sometimes runs out of allowed memory for my plan, trying to do both at once. If I could split them out into 2 separate actions I could avoid this. |
Can you please give example of corect syntax to be put in browserslist, for whoever are not familiar with the meaning of i.e.:
|
@ttodua it's been a while since your question, but here is the extensive explanation: https://github.com/browserslist/browserslist#browserslistrc TL;DR: each row is connected with an OR, therefore, "build for every browser version which has >1% market share OR the last 2 versions of a browser OR is not IE version <= 8. I changed my file to be
This results in Vue CLI building only for modern browsers. |
Inspired by Meteor 1.7 and the fact that you can easily ship ES2015 code and legacy code side-by-side, we can enable a mode where Vue CLI produces two bundles: one for legacy browsers using the specified
browserslist
values, and one that targets only browsers that support<script type="module">
.babel-preset-env
supportstargets: { esmodules: true }
which allows us to easily target these modern browsers.This should allow Vue CLI users to ship a significantly smaller, and decently more performant bundle to a large percentage of end users. In Vue 2.6 we can also add a build of Vue that ships native ES2015, which can be used in this mode.
The text was updated successfully, but these errors were encountered: