fix(vite): support ssr css modules (#3355)

Fixes https://github.com/denoland/fresh/issues/3325
This commit is contained in:
Marvin Hagemeister
2025-09-08 16:23:13 +02:00
committed by GitHub
parent 4c3ff9b74d
commit 2c32ffe8f3
11 changed files with 520 additions and 270 deletions
+3
View File
@@ -25,6 +25,7 @@ export interface FreshFsMod<State> {
default?:
| AnyComponent<PageProps<unknown, State>>
| AsyncAnyComponent<PageProps<unknown, State>>;
css?: string[];
}
export interface FsRouteFile<State> {
@@ -35,6 +36,7 @@ export interface FsRouteFile<State> {
type: CommandType;
routePattern: string;
overrideConfig: RouteConfig | undefined;
css: string[];
}
// deno-lint-ignore no-explicit-any
@@ -334,5 +336,6 @@ function normalizeRoute<State>(
// deno-lint-ignore no-explicit-any
handler: (handlers as any) ?? undefined,
component: mod.default,
css: rawMod.css,
};
}