fix top-level await not supported in targets
All checks were successful
/ depoly (push) Successful in 1m32s

This commit is contained in:
thislight 2024-11-13 19:30:16 +08:00
parent c97f61db06
commit 637eda5ac1
No known key found for this signature in database
GPG key ID: FCFE5192241CCD4E

View file

@ -1,10 +1,10 @@
import { render } from "solid-js/web";
import App from "./App.js";
import "solid-devtools";
import { attachDevtoolsOverlay } from "@solid-devtools/overlay";
render(() => <App />, document.getElementById("root")!);
if (import.meta.env.VITE_DEVTOOLS_OVERLAY === "true") {
const overlay = await import("@solid-devtools/overlay")
overlay.attachDevtoolsOverlay()
attachDevtoolsOverlay();
}