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')
|
||||
module.exports = {
|
||||
devServer: {
|
||||
port: 8081,
|
||||
proxy: {
|
||||
'/api': {
|
||||
target: 'http://47.105.32.17:8888',
|
||||
changeOrigin: true,
|
||||
pathRewrite: {
|
||||
'^/api': ''
|
||||
|
||||
module.exports = defineConfig(() => {
|
||||
const NODE_ENV = 'development'
|
||||
|
||||
return {
|
||||
devServer: {
|
||||
port: 8081,
|
||||
proxy: {
|
||||
'/api': {
|
||||
// target: 'http://47.105.32.17:8888',
|
||||
target: 'http://10.157.100.138:8888',
|
||||
changeOrigin: true,
|
||||
pathRewrite: { '^/api': '' }
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
// 公共路径:生产环境加 /pc/,开发环境用 /
|
||||
publicPath: NODE_ENV === 'production' ? '/pc/' : '/',
|
||||
outputDir: 'dist',
|
||||
assetsDir: 'assets',
|
||||
|
||||
}
|
||||
}
|
||||
})
|
||||
Reference in New Issue
Block a user