From e18f77c0f526244bd7aa0aebd5f7173f8f884272 Mon Sep 17 00:00:00 2001 From: Danilo Woznica Date: Fri, 3 Mar 2023 09:39:59 +0000 Subject: [PATCH] Update index.ts --- sandpack-react/src/styles/index.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sandpack-react/src/styles/index.ts b/sandpack-react/src/styles/index.ts index d7606e17c..fb2779cd0 100644 --- a/sandpack-react/src/styles/index.ts +++ b/sandpack-react/src/styles/index.ts @@ -12,6 +12,8 @@ import { createStitchesMock } from "./stitches-mock"; export const THEME_PREFIX = "sp"; const getNodeProcess = (): false | string | undefined => { + if (typeof process === "undefined") return false; + return ( process.env.SANDPACK_BARE_COMPONENTS || process.env.NEXT_PUBLIC_SANDPACK_BARE_COMPONENTS