使用react dva按需加载
然后子路由组件会报错。
Add "publicPath": "/" to .webpackrc or .roadhogrc can fix this issue
export default function RouterConfig({ history,app }) { const LoginPage = (dynamic as any)({ app, component:()=>import('./routes/LoginPage/LoginPage') }) const HomePage = (dynamic as any)({ app, component:()=>import('./routes/HomePage') })