Skip to content

Commit ce00b4b

Browse files
authored
fix server-side testing with vitest/ssr (#217)
Fixes #211
1 parent 904b25b commit ce00b4b

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.changeset/little-mice-mate.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'vite-plugin-solid': patch
3+
---
4+
5+
Fix server-side testing with vitest/ssr

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ export default function solidPlugin(options: Partial<Options> = {}): Plugin {
298298
config.resolve.conditions = [
299299
'solid',
300300
...(replaceDev ? ['development'] : []),
301-
...(isTestMode && !opts.isSsrTargetWebworker ? ['browser'] : []),
301+
...(isTestMode && !opts.isSsrTargetWebworker && !options.ssr ? ['browser'] : []),
302302
...config.resolve.conditions,
303303
];
304304
},

0 commit comments

Comments
 (0)