fix(vite): nested island css module styles not working (#3353)
Related https://github.com/denoland/fresh/issues/3325
This commit is contained in:
@@ -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>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
.root {
|
||||
color: green;
|
||||
}
|
||||
@@ -1,6 +1,14 @@
|
||||
import { CssModulesNonIsland } from "../components/CssModuleNonIsland.tsx";
|
||||
// @ts-ignore upstream issue https://github.com/denoland/deno/issues/30560
|
||||
import styles from "./CssModules.module.css";
|
||||
import { CssModulesOther } from "./CssModulesOther.tsx";
|
||||
|
||||
export function CssModules() {
|
||||
return <h1 class={styles.root}>red text</h1>;
|
||||
return (
|
||||
<div class="red">
|
||||
<h1 class={styles.root}>red text</h1>
|
||||
<CssModulesOther />
|
||||
<CssModulesNonIsland />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
.root {
|
||||
color: blue;
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
// @ts-ignore upstream issue https://github.com/denoland/deno/issues/30560
|
||||
import styles from "./CssModulesOther.module.css";
|
||||
|
||||
export function CssModulesOther() {
|
||||
return (
|
||||
<div class="blue">
|
||||
<h1 class={styles.root}>blue text</h1>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user