📜  webpack 设置代理手册 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:02:28.552000             🧑  作者: Mango

代码示例1
proxy: [{
  "/api": "http://localhost:3000",
},{
  context: ['/alpha', '/bravo', '/charlie', '/zulu'],
  target: 'http://localhost:8080',
  rewrite: function (path, req) { return path.replace(/\/(.*?)/g, '') }
}]