fix(vite): error when npm package requires json files (#3210)
This commit is contained in:
@@ -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 />;
|
||||
}
|
||||
Reference in New Issue
Block a user