Webpack 2

January 10, 2017 5:55 pm Published by Leave your thoughts

Webpack is my current module bundler.

Webpack 1 wasn’t able to parse ES2015 modules, so Babel would convert them into CommonJS. I really hated this workflow.

Webpack 2 can parse ES2015 modules, and is able to eliminate dead code based on which modules are used. Dead code removal, aka tree shaking, is reason enough for me to upgrade to Weback 2.

Webpack 2 is in beta primarily due to documentation not being finished. But documentation for Webpack has always been horrible so it really matter?

For tree shaking using webpack2, here is an excellent post you can follow along.


Tags: ,

Categorized in:

This post was written by hackya

Leave a Reply

Your email address will not be published. Required fields are marked *