在 vuejs-template/webpack 或 vuejs-template/pwa 中增加骨架页面 vue-skeleton-webpack-plugin
安装骨架页面插件库
1 | yarn add vue-skeleton-webpack-plugin -D |
build/webpack.skeleton.conf.js
1 | ; |
build/vue-loader.conf.js
找到 extract: isProduction 修改为 extract: true
build/webpack.dev.conf.js
在 plugins 中对象中增加插件, 需要引入模块 const ExtractTextPlugin = require('extract-text-webpack-plugin')
1 | // extract css into its own file |
build/webpack.dev.conf.js webpack.prod.conf.js
在 plugins 中对象中增加插件, 需要引入模块 const SkeletonWebpackPlugin = require('vue-skeleton-webpack-plugin')
需要引入模块 const SkeletonWebpackPlugin = require('vue-skeleton-webpack-plugin')
1 | // inject skeleton content(DOM & CSS) into HTML |