This commit is contained in:
parent
0202946813
commit
965ca33d33
@ -46,13 +46,14 @@ async function loadComponent(name: string) {
|
||||
return mod;
|
||||
}
|
||||
|
||||
const preLoad = ["index", "package", "browse_folder", "browse_file"];
|
||||
|
||||
preLoad.forEach((page) =>
|
||||
loadComponent(page).catch((err) =>
|
||||
console.error("Error preloading", page, err)
|
||||
)
|
||||
);
|
||||
import index from "./views/index.tsx";
|
||||
componentCache.set("index", index as Component);
|
||||
import pkg from "./views/package.tsx";
|
||||
componentCache.set("package", pkg as Component);
|
||||
import browse_folder from "./views/browse_folder.tsx";
|
||||
componentCache.set("browse_folder", browse_folder as Component);
|
||||
import browse_file from "./views/browse_file.tsx";
|
||||
componentCache.set("browse_file", browse_file as Component);
|
||||
|
||||
export default async function render(
|
||||
name: string,
|
||||
|
Loading…
Reference in New Issue
Block a user