Skip to content

Commit 63650a9

Browse files
mwanagomontogeek
authored andcommitted
fix(docs) Added a mention about ModuleConcatenationPlugin in the tree shaking (webpack#2440) (webpack#2441)
* fix(docs) Added a mention about ModuleConcatenationPlugin in the tree shaking (webpack#2440) * fix(docs) Changed absolute URLs to relative ones in the tree shaking documentation (webpack#2440)
1 parent 4804e07 commit 63650a9

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/content/guides/tree-shaking.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,7 @@ With that squared away, we can run another `npm run build` and see if anything h
198198

199199
Notice anything different about `dist/bundle.js`? Clearly the whole bundle is now minified and mangled, but, if you look carefully, you won't see the `square` function included but will see a mangled version of the `cube` function (`function r(e){return e*e*e}n.a=r`). With minification and tree shaking our bundle is now a few bytes smaller! While that may not seem like much in this contrived example, tree shaking can yield a significant decrease in bundle size when working on larger applications with complex dependency trees.
200200

201+
T> [ModuleConcatenationPlugin](/plugins/module-concatenation-plugin) is needed for the tree shaking to work. It is added by `mode: "production"`. If you are not using it, remember to add the [ModuleConcatenationPlugin](/plugins/module-concatenation-plugin) manually.
201202

202203
## Conclusion
203204

0 commit comments

Comments
 (0)