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
@@ -0,0 +1,6 @@
import { CssModulesNonIsland4 } from "../components/CssModuleNonIsland4.tsx";
import { define } from "../utils.ts";
export default define.page(() => {
return <CssModulesNonIsland4 />;
});
@@ -0,0 +1,17 @@
import type { PageProps } from "fresh";
import { CssModulesNonIsland } from "../components/CssModuleNonIsland.tsx";
export default function App({ Component }: PageProps) {
return (
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
</head>
<body>
<CssModulesNonIsland />
<Component />
</body>
</html>
);
}
@@ -0,0 +1,6 @@
import { define } from "../utils.ts";
import { CssModulesNonIsland2 } from "../components/CssModuleNonIsland2.tsx";
export default define.page(() => {
return <CssModulesNonIsland2 />;
});
@@ -0,0 +1,11 @@
import { CssModulesNonIsland3 } from "../components/CssModuleNonIsland3.tsx";
import { define } from "../utils.ts";
export default define.layout(({ Component }) => {
return (
<>
<CssModulesNonIsland3 />
<Component />
</>
);
});
@@ -0,0 +1,5 @@
import { define } from "../utils.ts";
export default define.page(() => {
throw new Error("boom");
});
@@ -0,0 +1,3 @@
export default function Hello() {
return <h1>ok</h1>;
}