|
@ -4,13 +4,24 @@ |
|
|
|
|
|
|
|
|
const path = require('path') |
|
|
const path = require('path') |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
module.exports = { |
|
|
module.exports = { |
|
|
dev: { |
|
|
dev: { |
|
|
|
|
|
env: require('./dev.env'), |
|
|
// Paths
|
|
|
// Paths
|
|
|
assetsSubDirectory: 'static', |
|
|
assetsSubDirectory: 'static', |
|
|
assetsPublicPath: '/', |
|
|
assetsPublicPath: '/', |
|
|
proxyTable: {}, |
|
|
proxyTable: { |
|
|
|
|
|
'/api': { // 匹配所有以 '/api'开头的请求路径
|
|
|
|
|
|
target: 'http://192.168.3.9:8085', // 代理目标的基础路径
|
|
|
|
|
|
// target: 'https://260e7735j5.oicp.vip', // 代理目标的基础路径
|
|
|
|
|
|
// target: process.env.VUE_APP_URL, // 代理目标的基础路径
|
|
|
|
|
|
changeOrigin: true, // 支持跨域
|
|
|
|
|
|
pathRewrite: { // 重写路径: 去掉路径中开头的'/api'
|
|
|
|
|
|
'^/api': '' |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
// Various Dev Server settings
|
|
|
// Various Dev Server settings
|
|
|
host: '127.0.0.1', // can be overwritten by process.env.HOST localhost
|
|
|
host: '127.0.0.1', // can be overwritten by process.env.HOST localhost
|
|
|