Skip to content

Commit

Permalink
fix: import.meta SSR
Browse files Browse the repository at this point in the history
#fix 802
  • Loading branch information
pikax committed Mar 27, 2021
1 parent 7becca9 commit aafc3e1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ function createReplacePlugin(
__SSR__: isBrowserBuild
? false
: isBundlerESMBuild
? `(('process' in globalThis ? globalThis.process.env.SSR : 'import' in globalThis ? globalThis.import.meta.env.SSR : false) == true)`
? `((globalThis.import ? globalThis.import.meta.env.SSR : process.env.SSR ) == true)`
: true,
// this is only used during tests
__TEST__: isBundlerESMBuild ? `(process.env.NODE_ENV === 'test')` : false,
Expand Down

0 comments on commit aafc3e1

Please sign in to comment.