Uh oh!
There was an error while loading. Please reload this page.
Fix server-side testing with vitest/ssr - #217
Conversation
benoitv-code
commented
Oct 1, 2025
@birkskyum Can you have a look at this PR please? (this prevents me from updating to a version that supports vite 7 :)) Thanks! |
birkskyum
left a comment
There was a problem hiding this comment.
I think it looks reasonable, so let's try this. Thanks!
birkskyum
commented
Oct 1, 2025
@bluwy , if you have some thoughts on this , I'd love to hear it. |
birkskyum
commented
Oct 1, 2025
It's publishing a patch now - you can check if it works. |
bluwy
commented
Oct 1, 2025
The change seems fine to me.
|
Fix server-side testing with vitest/ssr
Initial error
Initial error when running vitest in ssr mode, since
vite-plugin-solid@2.11.1(introduced by #173, reported by #211):Proposed fix
'browser'ifoptions.ssris setI am not familiar with the code, and I am not sure if it could lead to issues for other setups.
An alternative could be to only add
'browser'if the conditions don't already include'node':Let me know which solution seems to be the best.
Additional note
The
opts.isSsrTargetWebworkercheck seems to be inconsistant in the original code, I've left it untouched as I am not sure what is the intent there:Can original author comment on if the original logic seems consistent? (cc @bluwy@brenelz)
Thanks!
Fixes#211