fix(vite): error when npm package requires json files (#3210)

This commit is contained in:
Marvin Hagemeister
2025-08-08 14:16:38 +02:00
committed by GitHub
parent 1f3f0a48f5
commit d026375c3e
7 changed files with 81 additions and 3 deletions
@@ -0,0 +1,14 @@
import * as mime from "mime-db";
import { useEffect, useState } from "preact/hooks";
export function MimeIsland() {
// deno-lint-ignore no-console
console.log(mime);
const [ready, setReady] = useState(false);
useEffect(() => {
setReady(true);
}, []);
return <h1 class={ready ? "ready" : ""}>mime</h1>;
}
@@ -0,0 +1,5 @@
import { MimeIsland } from "../../islands/tests/Mime.tsx";
export default function Page() {
return <MimeIsland />;
}