1 Star 0 Fork 87

剑气非关月/vue-admin-work-x

forked from 清清玄/vue-admin-work-x 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
vue.config.js 959 Bytes
一键复制 编辑 原始数据 按行查看 历史
qingqingxuan 提交于 2021-11-23 16:02 . fixed: layoutStore type
// 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",
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
}))
}
}
};
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
TypeScript
1
https://gitee.com/guanyue/vue-admin-work-x.git
git@gitee.com:guanyue/vue-admin-work-x.git
guanyue
vue-admin-work-x
vue-admin-work-x
master

搜索帮助