feat:设置跨域代理
This commit is contained in:
@@ -67,9 +67,24 @@ const config = {
|
||||
router: {
|
||||
mode: 'browser', // 或者是 'browser'
|
||||
},
|
||||
// defineConstants: {
|
||||
// HOST: '"/api"'
|
||||
// },
|
||||
// devServer: {
|
||||
// proxy: {
|
||||
// '/api/': {
|
||||
// target: JSON.parse('"http://localhost:8082"'),
|
||||
// pathRewrite: {
|
||||
// '^/api/': '/'
|
||||
// },
|
||||
// changeOrigin: true
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
module.exports = function (merge) {
|
||||
if (process.env.NODE_ENV === 'development') {
|
||||
return merge({}, config, require('./dev'))
|
||||
|
||||
Reference in New Issue
Block a user