fix: CSS modules not working in _app/_layout/_error and across routes in non-island components (#3781)

This commit is contained in:
Hajime-san
2026-05-27 08:32:41 +02:00
committed by GitHub
parent 072d09297e
commit 3afaaf4f78
30 changed files with 464 additions and 39 deletions
+5 -1
View File
@@ -7,6 +7,7 @@ import { DEFAULT_CONN_INFO } from "./app.ts";
import type { Command } from "./commands.ts";
import { fsItemsToCommands, type FsRouteFile } from "./fs_routes.ts";
import * as path from "@std/path";
import { toPosix } from "./dev/dev_build_cache.ts";
const STUB = {} as unknown as Deno.ServeHandlerInfo;
@@ -123,7 +124,10 @@ export function createFakeFs(files: Record<string, unknown>): FsAdapter {
},
// deno-lint-ignore require-await
async isDirectory(dir) {
return Object.keys(files).some((file) => file.startsWith(dir + "/"));
return Object.keys(files).some((file) =>
// normalize path to posix before comparing
toPosix(file).startsWith(dir + "/")
);
},
async mkdirp(_dir: string) {
},