import React from 'react'; import { Router, Route, Switch } from 'dva/router'; import { LocaleProvider } from 'antd'; import zhCN from 'antd/lib/locale-provider/zh_CN'; import dynamic from 'dva/dynamic'; function RouterConfig({ history, app }) { const BasicLayout = dynamic({ app, models: () => [ import('./models/user'), ], component: () => import('./layouts/BasicLayout'), }); const UserLayout = dynamic({ app, component: () => import('./layouts/UserLayout'), }); return ( } /> } /> ); } export default RouterConfig;