1 Star 0 Fork 5

冰是睡着的水/CastleFortress-ui

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
vue.config.js 1.63 KB
一键复制 编辑 原始数据 按行查看 历史
孙余伟 提交于 2022-09-15 11:30 . CastleFortress-ui
const path = require("path");
const minify = process.env.NODE_ENV === 'development' ? false : {
collapseWhitespace: true,
removeComments: true,
removeRedundantAttributes: true,
removeScriptTypeAttributes: true,
removeStyleLinkTypeAttributes: true,
useShortDoctype: true,
minifyCSS: true,
minifyJS: true
}
function resolve(dir) {
return path.resolve(__dirname, dir);
}
module.exports = {
publicPath: process.env.NODE_ENV === 'production' ? '/admin/' : '/',
pages: {
index: {
entry: 'src/main.js',
template: 'public/index.html',
filename: 'index.html',
chunks: ['chunk-vendors', 'chunk-common', 'index'],
minify
},
preview: {
entry: 'src/views/preview/main.js',
template: 'public/preview.html',
filename: 'preview.html',
chunks: ['chunk-vendors', 'chunk-common', 'preview'],
minify
}
},
devServer: {
port: 8888,
proxy: {
"/api/": {
target: process.env.VUE_APP_ROOT_URL_ENV,
changeOrigin: true,
ws: true,
pathRewrite: {
"^/api/": "",
},
},
},
},
lintOnSave: false,
runtimeCompiler: true,
productionSourceMap: false,
chainWebpack: config => {
config.resolve.alias
.set("@", resolve("src"));
// 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()
},
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/heaiso1688/castle-fortress-ui.git
git@gitee.com:heaiso1688/castle-fortress-ui.git
heaiso1688
castle-fortress-ui
CastleFortress-ui
master

搜索帮助