Describe the bug
I'm not sure if that's a bug or if I'm doing something wrong, but when I'm trying to use Route with components loaded via lazy, trying to render it with renderToStringAsync it returns an empty string.
Your Example Website or App
https://github.com/kaathewisegit/solid-ssr-issue
Steps to Reproduce the Bug or Issue
npm install
- Run
npm run build:ssr or vite build --ssr src/entry-server --outDir dist/server/
- run
node dist/server/entry-server.js. It will return an empty string
Expected behavior
I expected it to return lazily loaded component. Replacing <Route path="/" component={lazy(() => import("./component"))} /> with an explicit import and <Route path="/" component={Component}/> makes it work correctly.
Platform
- OS: Alpine Linux 3.24.0_alpha20260127
- Browser: none, runtime Node.js v24.13.0
Describe the bug
I'm not sure if that's a bug or if I'm doing something wrong, but when I'm trying to use
Routewith components loaded vialazy, trying to render it withrenderToStringAsyncit returns an empty string.Your Example Website or App
https://github.com/kaathewisegit/solid-ssr-issue
Steps to Reproduce the Bug or Issue
npm installnpm run build:ssrorvite build --ssr src/entry-server --outDir dist/server/node dist/server/entry-server.js. It will return an empty stringExpected behavior
I expected it to return
lazily loaded component. Replacing<Route path="/" component={lazy(() => import("./component"))} />with an explicit import and<Route path="/" component={Component}/>makes it work correctly.Platform