1 Star 0 Fork 1.5K

wison/form-generator

forked from Mr_HJ/form-generator 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
vue.config.js 1.54 KB
一键复制 编辑 原始数据 按行查看 历史
Mr_HJ 提交于 2019-12-30 09:55 . set publicPath
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.join(__dirname, dir)
}
module.exports = {
publicPath: process.env.NODE_ENV === 'production'
? '/form-generator/'
: '/',
pages: {
index: {
entry: "src/views/index/main.js",
template: "public/index.html",
filename: "index.html",
chunks: ["chunk-vendors", "chunk-common", "index"],
minify: minify
},
preview: {
entry: "src/views/preview/main.js",
template: "public/preview.html",
filename: "preview.html",
chunks: ["chunk-vendors", "chunk-common", "preview"],
minify: minify
}
},
productionSourceMap: false,
configureWebpack: {
externals: {
'vue': 'Vue',
'vue-router': 'VueRouter',
'axios': 'axios',
'element-ui': 'ELEMENT',
'monaco': 'monaco',
'beautifier': 'beautifier'
}
},
chainWebpack(config) {
// 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()
}
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/wurong19870715/form-generator.git
git@gitee.com:wurong19870715/form-generator.git
wurong19870715
form-generator
form-generator
master

搜索帮助