feat: init

This commit is contained in:
陶林 2023-10-01 01:36:39 +08:00
parent b051c59e9e
commit b15f09c27c
2 changed files with 6 additions and 5 deletions

View File

@ -1,13 +1,10 @@
import { defineConfig } from 'umi'; import { defineConfig } from 'umi';
import routes from './routes'
export default defineConfig({ export default defineConfig({
nodeModulesTransform: { nodeModulesTransform: {
type: 'none', // all 慢 兼容好 type: 'none', // all 慢 兼容好
}, },
routes: [ routes,
{ path: '/', component: '@/pages/index' },
{ path: '/about', component: '@/pages/about' },
],
fastRefresh: {}, fastRefresh: {},
history: { history: {
type: 'browser' type: 'browser'

4
config/routes.ts Normal file
View File

@ -0,0 +1,4 @@
export default [
{ path: '/', component: '@/pages/index' },
{ path: '/about', component: '@/pages/about' },
]