Vue: Provide ES2015 bundle?

Created on 27 Oct 2017  ·  2Comments  ·  Source: vuejs/vue

What problem does this feature solve?

Recently I'm working on a project that attempts to deploy ES2015 code to production. The idea was inspired by Philip Walton's post.

I hacked vuejs-templates/webpack to output dual bundles with feature detection to downgrade. The benefit is significant: ES2015 script execution time is only about 55% of ES5! And the bundle size reduces too. If vue (as well as vue-router, vuex, etc.) could provide ES2015 bundles, the performance boost can be even more significant.

According to the es6 compatibility table, ES2015 compatible browsers have got a lot of market shares. Although vue relies on ES5 feature Object.defineProperty, I think it is still meaningful to provide ES2015 bundle as an option.

What does the proposed API look like?

This request is not about some particular APIs.

feature request

Most helpful comment

I believe PR #7110 tackles this issue.

All 2 comments

I believe PR #7110 tackles this issue.

To clarify: The ESM build also disables buble ES6 to ES5 transpilation in addition to allowing direct import in the browser as a module.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

paulpflug picture paulpflug  ·  3Comments

6pm picture 6pm  ·  3Comments

fergaldoyle picture fergaldoyle  ·  3Comments

robertleeplummerjr picture robertleeplummerjr  ·  3Comments

lmnsg picture lmnsg  ·  3Comments