2017-10-19 143 views

回答

0

您可以尝试调整的WebPack-DEV-服务器代理对象pathRewrite财产

devServer: { 
    contentBase: <Your-Value>, 
    proxy = { 
     '/test/menuList': { 
      target: http://localhost:9000/test/menuList, 
      pathRewrite(req, options) { 
        return req + '.json'; 
      } 
     } 
    } 
    ... 
} 
相关问题