路由懒加载

This commit is contained in:
none
2023-03-21 13:38:52 +08:00
parent 3cd9b2b816
commit a0a6744404
2 changed files with 9 additions and 2 deletions

View File

@@ -1,6 +1,9 @@
import { lazy } from "react";
import { RouteObject } from "react-router-dom";
import { LoginPage, LayoutPage } from "../pages";
import { LayoutPage } from "../pages";
const LoginPage = lazy(() => import('../pages/login'))
const routes: RouteObject[] = [
{