Tree Shaking

Other topics

ES2015 tree shaking

webpack 2 introduces tree shaking which can remove unused code when ES2015 modules are used to import and export code.

Install

npm install babel-preset-es2015-webpack --save-dev

Usage

in .babelrc:

{
    "presets": [
        "es2015-webpack"
    ]
}

Contributors

Topic Id: 6466

Example Ids: 22216

This site is not affiliated with any of the contributors.