diff --git a/src/buildOptimizations.ts b/src/buildOptimizations.ts index 3fc87b9..f3200a8 100644 --- a/src/buildOptimizations.ts +++ b/src/buildOptimizations.ts @@ -1,5 +1,7 @@ // We need to polyfill process if it doesn't exist, such as in the browser. -process ||= process || { env: {} }; +if (typeof process === "undefined") { + globalThis.process = { env: {} } as typeof process; +} /** * `true` if in the production environment, `false` otherwise.