UNPKG

hel-tdesign-react

Version:

基于 hel-tpl-remote-react-comp-ts 改造的远程 tdesign-react 模块,此版本基于[0.42.1](https://0_42_1-tdesign-react.surge.sh/react/overview)构建

24 lines (18 loc) 594 B
/* eslint-disable */ /** * 配置 proxy, 代理到本地启动的mocker服务 * 这份文件是CRA读取的,不属于项目打包后会包含的代码,所以非ts后缀 */ const { createProxyMiddleware: proxy } = require('http-proxy-middleware'); function makeProxyConfig(target) { return { target, secure: false, changeOrigin: true, withCredentials: true, }; } // 如当前组件本地调试时需要发起的请求被代理出去,可配置此文件 module.exports = function (app) { app.use(proxy('/somepath', makeProxyConfig('https://xxx.yyy.com'))); };