zambezi / ez-build

Zambezi build tool
MIT License
2 stars 1 forks source link

Implement better optimizations for javascript bundle #32

Open mstade opened 8 years ago

mstade commented 8 years ago

Expected Behavior

The optimized javascript should be linked in a smarter way, such that we can make use of optimizations such as tree shaking and dead code elimination. Rollup is a good candidate for linking ES2015 code, however this means we either need to combine Rollup with Babel, for the ES2015 => ES5 transformations, or make this two separate transformations, where Rollup does a ES2015 => ES2015 transformation, which is then fed to Babel for the final ES5 transformation.

Current Behavior

Currently, the output bundle is just a concatenation of all javascript files that the unoptimized build outputs. This works, and isn't terrible, but we can do better.

mstade commented 8 years ago

Also worth noting is Babili, released today. It's an optimizer specifically for babel, doing ES2015 to ES2015 optimizations.