zhuxindaba / tree-shaking-demo

Home Page:http://www.2ality.com/2015/12/webpack-tree-shaking.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Demo: tree-shaking

This project demonstrates how to do tree-shaking (removal of unused exports) with webpack 2 and Babel 6.

Installation:

cd tree-shaking-demo/
npm install

There are two ways in which you can build and run the web app:

  • Build once:
    • npm run build
    • Open build/index.html
  • Watch files continuously, rebuild incrementally, whenever one of them changes:
    • npm run watch
    • Open build/index.html, manually reload page in browser whenever there was a change

About

http://www.2ality.com/2015/12/webpack-tree-shaking.html

License:MIT License


Languages

Language:JavaScript 92.5%Language:HTML 7.5%