Replies: 1 comment 1 reply
-
I think this is not only a question of templates, but also of documentation. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm aware of solid-lib-starter as a general guidance for how to package and distribute libraries. However, this approach turns out difficult when a library might be used in different contexts: SSR and browser in the app. E.g. I build an app with Astro which defaults to SSR rendering, but allows for hydration when needed. Unfortunately, I'm not able to use rollup-bundled components in Astro SSR context, because JSX is compiled to DOM calls which don't work in SSR.
Configuring
babel-solid-preset
to either SSR or DOM doesn't make sense at the library side to me. I believe this decision needs to be made by the app. Maybe I'm missing something, but I would prefer the library build to transpile TypeScript into JS and bundle supporting libraries (except externals likesolid-js
itself), but leave JSX as is (not transpiled into either SSR or DOM calls) for the consuming app to transpile.What do you think about it?
Beta Was this translation helpful? Give feedback.
All reactions