1 Star 0 Fork 21

紫水木鱼/admin-work-plus

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
vue.config.js 958 Bytes
一键复制 编辑 原始数据 按行查看 历史
sanlee 提交于 2022-01-07 11:12 . initial
// eslint-disable-next-line @typescript-eslint/no-var-requires
const CompressionPlugin = require("compression-webpack-plugin")
console.log(process.env.NODE_ENV)
module.exports = {
publicPath: process.env.NODE_ENV === 'development' ? '/' : "/admin-work-plus",
outputDir: "dist",
assetsDir: "static",
lintOnSave: true,
productionSourceMap: false,
devServer: {
hot: true,
port: 5567,
open: true,
},
configureWebpack: {
module: {
rules: [
{
test: /\.mjs$/,
include: /node_modules/,
type: 'javascript/auto'
}
]
}
},
chainWebpack(config) {
if (process.env.NODE_ENV === 'production') {
config.plugin('compressionPlugin')
.use(new CompressionPlugin({
filename: '[path].gz[query]',
algorithm: 'gzip',
test: /\.js$|\.html$|\.css/,
threshold: 50240,
deleteOriginalAssets: false
}))
}
}
};
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/zishuimuyu/admin-work-plus.git
git@gitee.com:zishuimuyu/admin-work-plus.git
zishuimuyu
admin-work-plus
admin-work-plus
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385