I need help getting SSR to work with component libraries #1533
Unanswered
Marvin-Brouwer
asked this question in
Q&A
Replies: 1 comment
-
|
Maybe this helps, I decided to put in a breakpoint and I noticed the hydration id is |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment


Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, I'm currently experimenting with solid-start and I can't get SSR to work.
I have a
pnpmmonorepo with some custom components.I have it set up so that the component libraries transpile
index.js,index.dom.js,index.ssr.js(and for compatibilityindex.cjsbut I might remove that)The dom.js uses the
esbuild-plugin-solidset to hydratable dom and the.ssr.jsis set to hydratable ssr.I've added specific solid exports to my package jsons but that doesn't seem to help.
When I default to
.jsor.dom.jsI get__vite_ssr_import_0__.template is not a functionin my server errors.When I default to
.ssr.jsI get an hydration marker mismatch error in the browser.I did add the pnpm workaround described in "https://github.com/solidjs-community/tsup-preset-solid?tab=readme-ov-file#usage-gotchas".
I'm not using
tsup-preset-solidper sé but the output generated should be the same.Additionally, when I default to
.jsor.dom.jsand I turn off SSR, everything works.Is there anyone here that might be able to help me getting SSR to work?
Note
When I said "default to" I mean having the nodejs package exports that are
package.json/mainor/package/json/exports/./import,/package/json/exports/./nodethat live next to the/package/json/exports/./solidexport definition.Beta Was this translation helpful? Give feedback.
All reactions