samccone / The-cost-of-transpiling-es2015-in-2016

Investigating the overhead cost of compiled es2015
1.34k stars 37 forks source link

Scope? what encompasses transpiling? #53

Open flying-sheep opened 8 years ago

flying-sheep commented 8 years ago

I think everything here's a bit apples and oranges.

I'm sure the minimal bundle is the following:

ES2015 with modules → ES 2015 rollup bundle (unwrapped, even an IIFE is additional code!) → ES2015 uglify (once uglify handles ES2015) → gzip (or do browsers support better compression nowadays?)

The result is evidently as small as possible, since dead code elimination/tree shaking takes place while no additional code is being created: no polyfills, no desugaring, no import/export syntax (rollup just concatenates everything in the right order)

Therefore I think you have to define an exact target here: what ES2015 features should remain unchanged? Which ones desugared or polyfilled?