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
-
Hi, I'm currently experimenting with solid-start and I can't get SSR to work.
I have a
pnpm
monorepo 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.cjs
but I might remove that)The dom.js uses the
esbuild-plugin-solid
set to hydratable dom and the.ssr.js
is 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
.js
or.dom.js
I get__vite_ssr_import_0__.template is not a function
in my server errors.When I default to
.ssr.js
I 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-solid
per sé but the output generated should be the same.Additionally, when I default to
.js
or.dom.js
and 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/main
or/package/json/exports/./import
,/package/json/exports/./node
that live next to the/package/json/exports/./solid
export definition.Beta Was this translation helpful? Give feedback.
All reactions