From abf8f5643e4aa046e9d9e732e1a3c38b2ac392d7 Mon Sep 17 00:00:00 2001 From: Ryan Carniato Date: Tue, 18 Jul 2023 14:29:10 -0700 Subject: [PATCH] fix DEBUG --- packages/start/islands/mount.tsx | 2 +- packages/start/vite/plugin.js | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/start/islands/mount.tsx b/packages/start/islands/mount.tsx index 4b82ab205..5e49995cd 100644 --- a/packages/start/islands/mount.tsx +++ b/packages/start/islands/mount.tsx @@ -21,7 +21,7 @@ export function hydrateServerRouter() { if (!Component || !el.dataset.hk) return; let hk = el.dataset.hk; - DEBUG("hydrating island", el.dataset.island, hk.slice(0, hk.length - 1) + `1-`, el); + _$DEBUG("hydrating island", el.dataset.island, hk.slice(0, hk.length - 1) + `1-`, el); let props = createStore({ ...JSON.parse(el.dataset.props!), diff --git a/packages/start/vite/plugin.js b/packages/start/vite/plugin.js index f2c8c58eb..80ab2c5f0 100644 --- a/packages/start/vite/plugin.js +++ b/packages/start/vite/plugin.js @@ -20,7 +20,7 @@ import babelServerModule from "../server/server-functions/babel.js"; import routeResource from "../server/serverResource.js"; // @ts-ignore -globalThis.DEBUG = debug("start:vite"); +globalThis._$DEBUG = debug("start:vite"); let _dirname = dirname(fileURLToPath(import.meta.url)); /** @@ -98,7 +98,7 @@ function solidStartConfig(options) { options.rootEntry = join(_dirname, "..", "virtual", "root.tsx"); } - DEBUG(options); + _$DEBUG(options); return { root, @@ -135,7 +135,7 @@ function solidStartConfig(options) { "import.meta.env.START_ISLANDS_ROUTER": JSON.stringify( options.experimental.islandsRouter ? true : false ), - DEBUG: process.env.NODE_ENV === "production" ? "(() => {})" : "globalThis.DEBUG", + _$DEBUG: process.env.NODE_ENV === "production" ? "(() => {})" : "globalThis._$DEBUG", "import.meta.env.START_ADAPTER": JSON.stringify( typeof options.adapter === "string" ? options.adapter @@ -663,7 +663,7 @@ export default function solidStart(options) { options ?? {} ); - DEBUG("options", options); + _$DEBUG("options", options); return [ solidStartConfig(options),