From f351f42ba8566cbfa72b483dd63d4debcb386230 Mon Sep 17 00:00:00 2001 From: Davide <43080019+edivados@users.noreply.github.com> Date: Wed, 30 Aug 2023 20:21:19 +0200 Subject: [PATCH] do not add prod scripts in dev (#1031) Co-authored-by: Ryan Carniato --- packages/start/root/Scripts.tsx | 35 ++++++++++++++++++--------------- 1 file changed, 19 insertions(+), 16 deletions(-) diff --git a/packages/start/root/Scripts.tsx b/packages/start/root/Scripts.tsx index cc1828e6b..505f412b7 100644 --- a/packages/start/root/Scripts.tsx +++ b/packages/start/root/Scripts.tsx @@ -3,6 +3,7 @@ import { useRequest } from "../server/ServerContext"; import { InlineStyles } from "./InlineStyles"; const isDev = import.meta.env.MODE === "development"; +const isProd = import.meta.env.PROD; const isSSR = import.meta.env.START_SSR; const isIslands = import.meta.env.START_ISLANDS; @@ -44,22 +45,24 @@ function DevScripts() { function ProdScripts() { const context = useRequest(); return ( - <> - {isSSR && } - - - {isServer && - (isSSR ? ( -