// vue.config.js
module.exports = {
devServer: {
port: 8088,
proxy: {
'/api': {
target: <url>,
changeOrigin: true,
//ws: true,
pathRewrite: {
'^/api': '',
},
},
},
},
transpileDependencies: [/\bvue-awesome\b/],
configureWebpack: {
plugins: [
new webpack.DllReferencePlugin({
context: path.join(__dirname, '..'),
manifest: require('./public/vendor/vendor-manifest.json'),
}),
],
}
};
接口返回了index.html
求救。
target: <url>,
改下 target: '<url>',