Skip to content

"modern" mode #1465

Closed
Closed
@yyx990803

Description

@yyx990803

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 supports targets: { 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    RFCintend to implementThe team has the intention to implement this feature at some point. Contribution is also welcome.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions