1 Star 0 Fork 87

薛定谔的猫/vue-admin-work-x

forked from 清清玄/vue-admin-work-x 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
vue.config.js 1008 Bytes
一键复制 编辑 原始数据 按行查看 历史
清清玄 提交于 2022-03-24 10:01 . fix some bug
// 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' ? '/' : "/vue-admin-work-x",
publicPath: '/',
outputDir: "dist",
assetsDir: "static",
lintOnSave: true,
productionSourceMap: false,
devServer: {
hot: true,
port: 5567,
open: true,
},
configureWebpack: {
devtool: 'source-map',
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
}))
}
}
};
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
TypeScript
1
https://gitee.com/whu6666/vue-admin-work-x.git
git@gitee.com:whu6666/vue-admin-work-x.git
whu6666
vue-admin-work-x
vue-admin-work-x
master

搜索帮助