This commit is contained in:
parent
4d9c2b3aa8
commit
c97f61db06
6 changed files with 30 additions and 1 deletions
|
@ -1,4 +1,10 @@
|
|||
import { render } from "solid-js/web";
|
||||
import App from "./App.js";
|
||||
import "solid-devtools";
|
||||
|
||||
render(() => <App />, document.getElementById("root")!);
|
||||
|
||||
if (import.meta.env.VITE_DEVTOOLS_OVERLAY === "true") {
|
||||
const overlay = await import("@solid-devtools/overlay")
|
||||
overlay.attachDevtoolsOverlay()
|
||||
}
|
||||
|
|
4
src/overrides.d.ts
vendored
4
src/overrides.d.ts
vendored
|
@ -7,6 +7,10 @@ interface ImportMetaEnv {
|
|||
* The code reversion. It's recommended to be the git commit sha.
|
||||
*/
|
||||
readonly VITE_CODE_VERSION?: string;
|
||||
/**
|
||||
* Attach the overlay (in the dev mode) if it's `"true"`.
|
||||
*/
|
||||
readonly VITE_DEVTOOLS_OVERLAY?: string;
|
||||
}
|
||||
|
||||
interface ImportMeta {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue