Skip to content

Commit

Permalink
docs(guides): add note in tree-shaking (#1474)
Browse files Browse the repository at this point in the history
Note that --optimize-minimize is not required for tree shaking.

Closes #1473
Ref #1331
  • Loading branch information
esbenp authored and skipjack committed Aug 3, 2017
1 parent bd924f9 commit 777e582
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions content/guides/tree-shaking.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,3 +84,5 @@ function(e,t,n){"use strict";function r(e){return e*e*e}t.a=r}
/* ... */
function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0);console.log(n.i(r.a)(5))}
```
T> Note that the `--optimize-minimize` flag enables tree shaking by including the `UglifyJsPlugin` behind the scenes. Alternatively, the `UglifyJsPlugin` can be included manually in the `plugins` section of your configuration file. The plugin, combined with webpack's resolving of `import` and `export` statements, is what makes tree shaking possible. See the [production build](/guides/production) guide for more information.

0 comments on commit 777e582

Please sign in to comment.