iam-frankqiu / webpack-tree-shaking-example

A simple tree shaking example app using webpack.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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!

About

A simple tree shaking example app using webpack.


Languages

Language:JavaScript 96.3%Language:HTML 3.7%