fix: CSS modules not working in _app/_layout/_error and across routes in non-island components (#3781)
This commit is contained in:
Vendored
+10
@@ -0,0 +1,10 @@
|
||||
// @ts-ignore upstream issue https://github.com/denoland/deno/issues/30560
|
||||
import styles from "./CssModulesNonIsland.module.css";
|
||||
|
||||
export function CssModulesNonIsland() {
|
||||
return (
|
||||
<div class="green">
|
||||
<h1 class={styles.root}>green text</h1>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Vendored
+9
@@ -0,0 +1,9 @@
|
||||
import styles from "./CssModulesNonIsland2.module.css";
|
||||
|
||||
export function CssModulesNonIsland2() {
|
||||
return (
|
||||
<div class="blue">
|
||||
<h1 class={styles.root}>blue text</h1>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Vendored
+9
@@ -0,0 +1,9 @@
|
||||
import styles from "./CssModulesNonIsland3.module.css";
|
||||
|
||||
export function CssModulesNonIsland3() {
|
||||
return (
|
||||
<div class="red">
|
||||
<h1 class={styles.root}>red text</h1>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Vendored
+9
@@ -0,0 +1,9 @@
|
||||
import styles from "./CssModulesNonIsland4.module.css";
|
||||
|
||||
export function CssModulesNonIsland4() {
|
||||
return (
|
||||
<div class="orange">
|
||||
<h1 class={styles.root}>orange text</h1>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
packages/plugin-vite/tests/fixtures/non_island_css_modules/components/CssModulesNonIsland.module.css
Vendored
+3
@@ -0,0 +1,3 @@
|
||||
.root {
|
||||
color: green;
|
||||
}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
.root {
|
||||
color: blue;
|
||||
}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
.root {
|
||||
color: red;
|
||||
}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
.root {
|
||||
color: orange;
|
||||
}
|
||||
Reference in New Issue
Block a user