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: Init project Init app Set 'vendor' entry Set up CommonsChunkPlugin Automatically splitting vendor Add router Dynamic import router components + async flag count in minChunks