1 Star 0 Fork 1

koumis/vue-bury

forked from 阿镇吃橙子/vue-bury 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
vue.config.js 1014 Bytes
一键复制 编辑 原始数据 按行查看 历史
阿镇吃橙子 提交于 2022-08-16 16:17 +08:00 . 引入骨架屏方案
const SkeletonWebpackPlugin = require("vue-skeleton-webpack-plugin");
const path = require('path');
module.exports = {
//此插件需要css分离
css: {
// 是否使用css分离插件 ExtractTextPlugin
extract: true,
// 开启 CSS source maps?
sourceMap: false,
// css预设器配置项
loaderOptions: {},
// 启用 CSS modules for all css / pre-processor files.
modules: false
},
configureWebpack: config => {
// 骨架屏
config.plugins.push(
new SkeletonWebpackPlugin({
webpackConfig: {
entry: {
app: path.join(__dirname, "./src/skeleton.js")
}
},
minimize: true,
quiet: true,
router: {
mode: "hash",
routes: [
{
path: "/home", //和router.js中的路径一样就行
skeletonId: "skeleton1" // 在skeleton 中的定义的 div 的id
},
]
}
})
);
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/koumis/vue-bury.git
git@gitee.com:koumis/vue-bury.git
koumis
vue-bury
vue-bury
master

搜索帮助