想使用vux2.x,webpack.base.conf.js文件应该怎么配置

2020-06-23 科技 90阅读
使用vux2.x,webpack.base.conf.js文件应该这样配置
var proxyMiddleware = require('http-proxy-middleware')
var webpackConfig = process.env.NODE_ENV === 'testing' ?
require('./webpack.prod.conf') :
require('./webpack.dev.conf')
// default port where dev server listens for incoming traffic
var port = process.env.PORT || config.dev.port
// Define HTTP proxies to your custom API backend
// https://github.com/chimurai/http-proxy-middleware
var proxyTable = {
'/api': {
target: 'http://xxx.com',
pathRewrite: {
'^/api': '/api',

}
}
}
声明:你问我答网所有作品(图文、音视频)均由用户自行上传分享,仅供网友学习交流。若您的权利被侵害,请联系fangmu6661024@163.com