diff --git a/config/config.ts b/config/config.ts index 2298f2b..376f0f7 100644 --- a/config/config.ts +++ b/config/config.ts @@ -1,13 +1,10 @@ import { defineConfig } from 'umi'; - +import routes from './routes' export default defineConfig({ nodeModulesTransform: { type: 'none', // all 慢 兼容好 }, - routes: [ - { path: '/', component: '@/pages/index' }, - { path: '/about', component: '@/pages/about' }, - ], + routes, fastRefresh: {}, history: { type: 'browser' diff --git a/config/routes.ts b/config/routes.ts new file mode 100644 index 0000000..e7ac9b0 --- /dev/null +++ b/config/routes.ts @@ -0,0 +1,4 @@ +export default [ + { path: '/', component: '@/pages/index' }, + { path: '/about', component: '@/pages/about' }, +]