fix: CSS modules not working in _app/_layout/_error and across routes in non-island components (#3781)
This commit is contained in:
@@ -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 />;
|
||||
});
|
||||
+11
@@ -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>;
|
||||
}
|
||||
Reference in New Issue
Block a user