minimal ssr|ssg-setup, general pointers for solid on the server

I am hacking around with having a solid jsx-template generate a typescript-file describing the schema (https://codesandbox.io/p/github/bigmistqke/solid-three-parser/master?file=%2Fsrc%2FCMSApp.tsx be aware it's a bit unconventional). I have the typing sorted, but I need to open the browser to generate them. Ideally it would generate those types and save them in a file everytime I change them (inspired by payloadcms), without having to open the browser, but I am a bit puzzled with what would be the best way to approach that. It does not need reactivity, so I believe it could be done in node and ssr-mode, but am a complete noob regarding solid on the server so could really use some points. I thought a more minimal set-up, compared to solidstart, could help for me to play around with this, but can not immediately find anything when googling. if something like this would be possible in solidstart i would also be interested in these suggestions!
3 Replies
bigmistqke
bigmistqke2y ago
ok lol didn't really look properly. found https://github.com/amoutonbrady/vite-ssr-solid. still open for suggestions if anybody faced a similar challenge works like a charm! mmm, I am getting a sporadic
const body = __vite_ssr_import_1__.renderToString(() => __vite_ssr_import_0__.createComponent(__vite_ssr_import_3__.default, {

TypeError: Cannot read properties of null (reading 'default')
const body = __vite_ssr_import_1__.renderToString(() => __vite_ssr_import_0__.createComponent(__vite_ssr_import_3__.default, {

TypeError: Cannot read properties of null (reading 'default')
and then it crashes
bigmistqke
bigmistqke2y ago
bigmistqke
bigmistqke2y ago
but if we ignore those it works pretty nicely!