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
+5
View File
@@ -1,3 +1,4 @@
import { setAdditionalStyles } from "./context.ts";
import { HttpError } from "./error.ts";
import { isHandlerByMethod, type PageResponse } from "./handlers.ts";
import type { MaybeLazyMiddleware, Middleware } from "./middlewares/mod.ts";
@@ -282,6 +283,10 @@ function applyCommandsInner<State>(
def = await route();
}
if (def.css !== undefined) {
setAdditionalStyles(ctx, def.css);
}
return renderRoute(ctx, def);
});