Umi配置proxy解決跨域問題

解決跨域須要在webpack配置proxy, umi將webpack配置保存在.umirc.js的配置文件中。 在.umirc.js文件加上:webpack proxy: { '/api': { target: 'http://localhost:9093', pathRewrite: { '^/api': '' }, changeOrigin: tru
相關文章
相關標籤/搜索