You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
/**
|
|
|
|
* 配置参考: https://cli.vuejs.org/zh/config/
|
|
|
|
*/
|
|
|
|
module.exports = {
|
|
|
|
baseUrl: process.env.NODE_ENV === 'production' ? '' : '/epmet-oper',
|
|
|
|
chainWebpack: (config) => {
|
|
|
|
// config.resolve.alias
|
|
|
|
// .set('@c', resolve('@/components'))
|
|
|
|
// .set('style', resolve('src/assets/style'))
|
|
|
|
const svgRule = config.module.rule('svg')
|
|
|
|
svgRule.uses.clear()
|
|
|
|
svgRule
|
|
|
|
.test(/\.svg$/)
|
|
|
|
.use('svg-sprite-loader')
|
|
|
|
.loader('svg-sprite-loader')
|
|
|
|
},
|
|
|
|
productionSourceMap: false,
|
|
|
|
outputDir: 'epmet-oper',
|
|
|
|
assetsDir: 'static',
|
|
|
|
devServer: {
|
|
|
|
open: true,
|
|
|
|
port: 9001,
|
|
|
|
overlay: {
|
|
|
|
errors: true,
|
|
|
|
warnings: true,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
// webpack简单配置
|
|
|
|
configureWebpack: {
|
|
|
|
// debuge调试配置
|
|
|
|
devtool: 'source-map',
|
|
|
|
externals: {
|
|
|
|
AMap: 'AMap',
|
|
|
|
},
|
|
|
|
resolve: {
|
|
|
|
//配置路径别名
|
|
|
|
// /node_modules/@vue/cli-service/lib/config/base.js中已经配好的@路径,所以这里可以直接使用@
|
|
|
|
alias: {
|
|
|
|
'@js': '@/js',
|
|
|
|
'@c': '@/components',
|
|
|
|
'@v': '@/views',
|
|
|
|
'@m': '@/img',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|