-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Inform --optimize-minimize is not required for tree shaking #1473
Comments
Ok so as you touched on in webpack/webpack#4713, I believe tree shaking is basically enabled via a combination of:
I'll take a look at your PR momentarily but Tree Shaking is one of the last guides left to review and synchronize with the others, see #1258 -- this comment in particular. My preference would be to add a small note for now, as you did in your PR, and then continue this discussion in #1258 or #1331 so we can try to resolve this confusion for good in the rewrite. |
Also, thanks to @TheDutchCoder, we now have a home for small examples that back each guide. We can do the same for tree shaking so we have a single place to discuss and test things. Note that we aren't linking to those yet from the guides themselves but probably will start doing so soon, once #1258 is finished and we have time to make sure everything is in sync. |
I think your plan is a good path for this. Thanks for taking your time to clarify the roadmap for the guides |
There seems to be some confusion as to when tree shaking occurs (ie what configuration is necessary). Ref #1331 webpack/webpack#4713 (comment)
Correct me if I am wrong but it seems multiple separate parts of webpack is responsible for different parts of tree shaking? Anywho, following webpack/webpack#4713 (comment) I thought it might be a good idea to note in the documentation that
--optimize-minimize
is not required for tree shaking to occur.I have added an initial PR #1474 . This is not meant as a final solution but more of an opener for a discussion of how to explain that
--optimize-minimize
is not only way to tree shaking but a production config is.The text was updated successfully, but these errors were encountered: