1
This commit is contained in:
@@ -1,15 +1,40 @@
|
|||||||
|
// module.exports = {
|
||||||
|
// devServer: {
|
||||||
|
// port: 8081,
|
||||||
|
// proxy: {
|
||||||
|
// '/api': {
|
||||||
|
// target: 'http://47.105.32.17:8888',
|
||||||
|
// changeOrigin: true,
|
||||||
|
// pathRewrite: {
|
||||||
|
// '^/api': ''
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
const { defineConfig } = require('@vue/cli-service')
|
const { defineConfig } = require('@vue/cli-service')
|
||||||
module.exports = {
|
|
||||||
|
module.exports = defineConfig(() => {
|
||||||
|
const NODE_ENV = 'development'
|
||||||
|
|
||||||
|
return {
|
||||||
devServer: {
|
devServer: {
|
||||||
port: 8081,
|
port: 8081,
|
||||||
proxy: {
|
proxy: {
|
||||||
'/api': {
|
'/api': {
|
||||||
target: 'http://47.105.32.17:8888',
|
// target: 'http://47.105.32.17:8888',
|
||||||
|
target: 'http://10.157.100.138:8888',
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
pathRewrite: {
|
pathRewrite: { '^/api': '' }
|
||||||
'^/api': ''
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
// 公共路径:生产环境加 /pc/,开发环境用 /
|
||||||
|
publicPath: NODE_ENV === 'production' ? '/pc/' : '/',
|
||||||
|
outputDir: 'dist',
|
||||||
|
assetsDir: 'assets',
|
||||||
|
|
||||||
}
|
}
|
||||||
|
})
|
||||||
Reference in New Issue
Block a user