Skip to content

docs(guide): Remove redundant hint #2188

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions src/content/guides/tree-shaking.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ contributors:
- MijaelWatts
- dmitriid
- probablyup
- gish
related:
- title: "webpack 4 beta — try it today!"
url: https://medium.com/webpack/webpack-4-beta-try-it-today-6b1d27d7d7e2#9a67
Expand Down Expand Up @@ -172,8 +173,6 @@ module.exports = {
};
```

T> Note that the `--optimize-minimize` flag can be used to insert the `UglifyJSPlugin` as well.

With that squared away, we can run another `npm run build` and see if anything has changed.

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.
Expand Down