Reputation: 969
I'm learning React and want to know if Webpack tree-shakes a React project by default when we do npm run build
to create the production version of the project?
Upvotes: 1
Views: 111
Reputation: 5747
Yes it does. You can view the built application in the build/
folder.
If you look at some of those .js files you will see they look quite different from your source contents. Your source will be tree-shaken and minified.
Upvotes: 2