From 7f2cca3ac3dd7643d7c8fe5a1537c958256f4964 Mon Sep 17 00:00:00 2001 From: Bas van den Wollenberg Date: Sun, 3 Nov 2024 01:06:15 +0100 Subject: [PATCH] allow disabling devtools overlay using environment variable --- .env.development | 1 + src/renderer/src/main.tsx | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 .env.development diff --git a/.env.development b/.env.development new file mode 100644 index 00000000..48194f00 --- /dev/null +++ b/.env.development @@ -0,0 +1 @@ +VITE_SOLID_DEVTOOLS=true diff --git a/src/renderer/src/main.tsx b/src/renderer/src/main.tsx index b0930c23..3ef42d79 100644 --- a/src/renderer/src/main.tsx +++ b/src/renderer/src/main.tsx @@ -4,6 +4,8 @@ import "@renderer/css/theme.css"; import { render } from "solid-js/web"; import { attachDevtoolsOverlay } from "@solid-devtools/overlay"; -attachDevtoolsOverlay(); +if (import.meta.env.VITE_SOLID_DEVTOOLS !== "false") { + attachDevtoolsOverlay(); +} render(() => , document.getElementById("root") as HTMLElement);