Skip to content
This repository has been archived by the owner on May 17, 2019. It is now read-only.

Modern bundles for modern browsers #426

Open
ksheedlo opened this issue Jul 11, 2018 · 1 comment
Open

Modern bundles for modern browsers #426

ksheedlo opened this issue Jul 11, 2018 · 1 comment

Comments

@ksheedlo
Copy link
Contributor

Type of issue

Feature request

Description

It would be cool if, instead of compiling all ES6 class syntax, async/await etc to ES5, Fusion could detect modern browsers that support these features and send them a more optimized bundle. For instance, class syntax doesn't need to be compiled into functions and prototypes anymore. This could significantly reduce the size of bundles sent to browsers that support modern features, since code volume generally goes up to support the newer syntax in the legacy environment.

Rel #34

Current behavior

Fusion delivers code to all browsers using the same compiler settings.

Desired behavior

Fusion delivers code to modern browsers using more aggressive compiler settings that allow browsers to provide their own class syntax and other ES6 features. Fusion still delivers the same transpiled and polyfilled code to legacy browsers.

@gaurav-
Copy link

gaurav- commented Aug 3, 2018

Meteor is probably the first (and so far the only one?) framework to do this properly. Some resources on how this is implemented in Meteor:

Edit:
Looks like Vue has also implemented this: vuejs/vue-cli#1465

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants