Skip to content

Commit

Permalink
SSR articles
Browse files Browse the repository at this point in the history
  • Loading branch information
shiro committed Apr 4, 2024
1 parent a78f25c commit f63afaa
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/routeMap.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import AboutSite from "~/about/AboutSite";
import App from "~/app";
import Article from "~/Article";
import BlogIndex from "~/BlogIndex";
import GallerySite from "~/GallerySite";

Expand All @@ -8,4 +9,5 @@ export const routeMap: Record<string, string | string[]> = {
"/": [BlogIndex],
"/gallery": [GallerySite],
"/about": [AboutSite],
"/articles/*": [Article],
} as any;
6 changes: 6 additions & 0 deletions vite/SSR/SSRPreloadDev.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,12 @@ const collectRec = (
visited.add(node.id);

const imports = [...node.clientImportedModules.values()];
// if (!node.id.includes("node_modules"))
// console.log(
// "dep",
// node.id,
// imports.map((x) => x.file)
// );

if (!ignorePatterns.some((pattern) => pattern.test(node.id!))) {
for (const dep of imports) {
Expand Down

0 comments on commit f63afaa

Please sign in to comment.