fix: twind including unused CSS rules (#1415)

This commit is contained in:
Marvin Hagemeister
2023-07-11 23:45:03 +02:00
committed by GitHub
parent c32f0cf9ce
commit 0d141b7153
6 changed files with 95 additions and 7 deletions
+4
View File
@@ -5,6 +5,8 @@
import * as $0 from "./routes/check-duplication.tsx";
import * as $1 from "./routes/insert-cssrules.tsx";
import * as $2 from "./routes/static.tsx";
import * as $3 from "./routes/unused.tsx";
import * as $4 from "./routes/unused_tw.tsx";
import * as $$0 from "./islands/CheckDuplication.tsx";
import * as $$1 from "./islands/InsertCssrules.tsx";
@@ -13,6 +15,8 @@ const manifest = {
"./routes/check-duplication.tsx": $0,
"./routes/insert-cssrules.tsx": $1,
"./routes/static.tsx": $2,
"./routes/unused.tsx": $3,
"./routes/unused_tw.tsx": $4,
},
islands: {
"./islands/CheckDuplication.tsx": $$0,
@@ -0,0 +1,4 @@
export default function Unused() {
const _unused = <div class="text-red-600" />;
return <h1>ready</h1>;
}
@@ -0,0 +1,9 @@
import { tw } from "https://esm.sh/@twind/core@1.1.3";
export default function Unused() {
// @ts-ignore twind types are wrong
tw`text-green-500`;
const _unused = <div class="text-red-600" />;
// @ts-ignore twind types are wrong
return <h1 class={tw`text-blue-500`}>ready</h1>;
}