Template
feat: 准备 GitHub 模板仓库
This commit is contained in:
1 parent
33121e3f6d
commit
ae021f06d1
11 files changed
+163
-52
No files matched your search
@@ -1,2 +1,3 @@
|
||||
export * from "./assets";
|
||||
export * from "./lazyRoute";
|
||||
export * from "./tailwind";
|
||||
@@ -0,0 +1,8 @@
|
||||
import type { ComponentType } from "react";
|
||||
|
||||
export function lazyRoute(loader: () => Promise<{ default: ComponentType }>) {
|
||||
return async () => {
|
||||
const module = await loader();
|
||||
return { Component: module.default };
|
||||
};
|
||||
}
|
||||
Reference in new issue
Block a user