Closed
Description
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.- We can likely extract the corresponding browsers list for autoprefixer as well.
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.