webpack-tree-shaking-example
webpack-tree-shaking-example copied to clipboard
A simple tree shaking example app using webpack.
Webpack Tree Shaking Example
This is a small sample app that shows how to perform tree shaking in Webpack. To install, simply clone the repo and npm install. From here, you can go with any number of commands:
- To do a dev build, run
npm run dev. - To generate an optimized production build, run
npm run build. - To run the app on a local server, run
npm start, and the app will be available at http://localhost:8080/
The master branch will not shake dependencies, because master is the starting point. To see how tree shaking works, check out the tree-shake branch.
Hope you find this useful!