All Projects → lyyourc → Webpack Code Splitting Demo

lyyourc / Webpack Code Splitting Demo

webpack code splitting & long term cache

Labels

webpack-code-splitting-demo

A vue.js demo 4 webpack code splitting,

and long term cache demo in cache branch.

Build Setup

# install dependencies
npm install

# serve with hot reload at localhost:8080
npm run dev

# build for production with minification
npm run build

Tutorial

Webpack 大法之 Code Splitting.

Steps:

  1. Init project
  2. Init app
  3. Set 'vendor' entry
  4. Set up CommonsChunkPlugin
  5. Automatically splitting vendor
  6. Add router
  7. Dynamic import router components
  8. + async flag
  9. count in minChunks
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].