1 Star 0 Fork 38

usench/halo-admin

forked from Halo/halo-admin 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
vue.config.js 1.15 KB
一键复制 编辑 原始数据 按行查看 历史
const pkg = require('./package.json')
const { defineConfig } = require('@vue/cli-service')
const dynamicThemePlugin = require('./src/webpack/dynamicTheme.js')
const CompressionPlugin = require('compression-webpack-plugin')
const productionGzipExtensions = /\.(js|css|json|txt|html|ico|svg)(\?.*)?$/i
module.exports = defineConfig({
publicPath: process.env.PUBLIC_PATH,
chainWebpack: config => {
config.plugin('html').tap(args => {
args[0].version = pkg.version
return args
})
if (process.env.NODE_ENV === 'production') {
config.plugin('compressionPlugin').use(
new CompressionPlugin({
filename: '[path][base].gz',
algorithm: 'gzip',
test: productionGzipExtensions,
threshold: 10240,
minRatio: 0.8,
deleteOriginalAssets: false
})
)
}
},
configureWebpack: {
plugins: [dynamicThemePlugin()]
},
css: {
loaderOptions: {
less: {
modifyVars: {
'border-radius-base': '2px'
},
javascriptEnabled: true
}
}
},
lintOnSave: false,
transpileDependencies: [],
productionSourceMap: false
})
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/usench/halo-admin.git
git@gitee.com:usench/halo-admin.git
usench
halo-admin
halo-admin
master

搜索帮助