Skip to content

Commit 8ef1ad0

Browse files
committed
fix(ssr): SSR check changed to also taking process.env into consideration
1 parent 31a57e3 commit 8ef1ad0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

rollup.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ function createReplacePlugin(
192192
__SSR__: isBrowserBuild
193193
? false
194194
: isBundlerESMBuild
195-
? `(import.meta.env.SSR == true)`
195+
? `(('process' in globalThis ? globalThis.process.env.SSR : 'import' in globalThis ? globalThis.import.meta.env.SSR : false) == true)`
196196
: true,
197197
// this is only used during tests
198198
__TEST__: isBundlerESMBuild ? `(process.env.NODE_ENV === 'test')` : false,

0 commit comments

Comments
 (0)