1 Star 0 Fork 3

ubaker/vue-data-board

forked from 猕花桃/vue-data-board 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
vue.config.js 1.44 KB
一键复制 编辑 原始数据 按行查看 历史
xuxiaofei.666 提交于 2020-02-28 00:55 +08:00 . update: build
'use strict'
const path = require('path')
function resolve(dir) {
return path.join(__dirname, dir)
}
module.exports = {
publicPath: '/',
outputDir: 'docs',
productionSourceMap: false,
chainWebpack(config) {
// set svg-sprite-loader
config.module
.rule('svg')
.exclude.add(resolve('src/icons'))
.end()
config.module
.rule('icons')
.test(/\.svg$/)
.include.add(resolve('src/icons'))
.end()
.use('svg-sprite-loader')
.loader('svg-sprite-loader')
.options({
symbolId: 'icon-[name]'
})
.end()
config
.optimization.splitChunks({
chunks: 'all',
cacheGroups: {
libs: {
name: 'chunk-libs',
test: /[\\/]node_modules[\\/]/,
priority: 10,
chunks: 'initial' // only package third parties that are initially dependent
},
elementUI: {
name: 'chunk-elementUI', // split elementUI into a single package
priority: 20, // the weight needs to be larger than libs and app or it will be packaged into libs or app
test: /[\\/]node_modules[\\/]_?element-ui(.*)/ // in order to adapt to cnpm
},
ECharts: {
name: 'chunk-ECharts',
priority: 20,
test: /[\\/]node_modules[\\/]_?echarts(.*)/ // in order to adapt to cnpm
}
}
})
// config.optimization.runtimeChunk('single')
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/ubaker/vue-data-board.git
git@gitee.com:ubaker/vue-data-board.git
ubaker
vue-data-board
vue-data-board
master

搜索帮助