Open
Description
I am using vitest to test files using renderToString
The vitest.config.ts
file uses:
export default defineConfig({
plugins: [solidPlugin({ ssr: true })],
test: {
environment: "node"
},
});
Since [email protected], I get the following error:
Error: renderToString is not supported in the browser, returning undefined
at throwInBrowser (.../node_modules/solid-js/web/dist/dev.js:1089:15)
As well as isServer
(from solid-js/web
) returning false
.
I believe this is linked to this change: #173
The workarounds I have:
- Sticking to
[email protected]
Or using this workaround in(this leads to other issues)vitest.config.ts
:ssr: { target: "webworker" }
Is it indeed a bug, or is there a better way to configure vitest to test ssr code from SolidJS?
Thanks!
Metadata
Metadata
Assignees
Labels
No labels