File tree 1 file changed +3
-3
lines changed
packages/qwik/src/optimizer/src/plugins
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -481,7 +481,7 @@ export function createPlugin(optimizerOptions: OptimizerOptions = {}) {
481
481
log ( `load()` , QWIK_BUILD_ID , opts . buildMode ) ;
482
482
return {
483
483
moduleSideEffects : false ,
484
- code : getQwikBuildModule ( loadOpts ) ,
484
+ code : getQwikBuildModule ( loadOpts , opts . target ) ,
485
485
} ;
486
486
}
487
487
@@ -749,8 +749,8 @@ export function createPlugin(optimizerOptions: OptimizerOptions = {}) {
749
749
return id ;
750
750
} ;
751
751
752
- function getQwikBuildModule ( loadOpts : { ssr ?: boolean } ) {
753
- const isServer = ! ! loadOpts . ssr ;
752
+ function getQwikBuildModule ( loadOpts : { ssr ?: boolean } , target : QwikBuildTarget ) {
753
+ const isServer = ! ! loadOpts . ssr || target === 'test' ;
754
754
const isDev = opts . buildMode === 'development' ;
755
755
return `// @builder.io/qwik/build
756
756
export const isServer = ${ JSON . stringify ( isServer ) } ;
You can’t perform that action at this time.
0 commit comments