11 lines
337 B
JavaScript
11 lines
337 B
JavaScript
// res-proxy.js —— 开发服务器把 /res/* 转给本地资源代理(tools/res_proxy.js)
|
||
config.devServer = config.devServer || {};
|
||
config.devServer.proxy = (config.devServer.proxy || []).concat([
|
||
{
|
||
context: ['/res'],
|
||
target: 'http://127.0.0.1:8082',
|
||
changeOrigin: true,
|
||
pathRewrite: { '^/res': '' },
|
||
},
|
||
]);
|