CVEO-water-frontend/vue.config.js
2021-01-04 17:15:44 +08:00

58 lines
1.4 KiB
JavaScript

const path = require('path')
const { env } = require('process')
module.exports = {
publicPath: '/',
devServer: {
host: '127.0.0.1',
port: 8090,
proxy: {
'/backend': {
// target: 'http://223.75.53.208:8081',
// target: 'http://121.36.155.145:10025/',
target: 'http://127.0.0.1:7788/'
}
}
},
productionSourceMap: false,
chainWebpack: config => {
config
.plugin('html')
.tap(args => {
args[0].title = '水质监测平台'
return args
})
},
configureWebpack: {
resolve: {
alias: {
'@': path.resolve(__dirname, 'src'),
'com': path.resolve(__dirname, 'src', 'components')
}
},
externals: true ? {
'vue': 'Vue',
'vuex':'Vuex',
'antd': 'antd',
'vue-router': 'VueRouter',
"moment": "moment",
"md5": "js-md5",
'axios': 'axios',
'v-charts':'VCharts',
'ol':'ol'
}: {
'antd': 'antd',
'ol':'ol',
'v-charts':'VCharts',
"moment": "moment",
"md5": "js-md5",
'axios': 'axios',
},
module: {
}
}
}