react proxy 报错

react项目中,package.json中proxy的配置如下

 "proxy": {
    "/api/rjwl": {
      "target": "http://47.94.142.215:8081",
      "changeOrigin": true
    }
  }

就会报这样的错误

When specified, "proxy" in package.json must be a string.
Instead, the type of "proxy" was "object".
Either remove "proxy" from package.json, or make it a string.

猜你喜欢

转载自www.cnblogs.com/wang715100018066/p/10723215.html
今日推荐