3 ms·
the issue i ran into recently was around react/jsx where i wanted .tsx files server side. might have to look into it again but there was an issue where some re
by joseferben 2y ago
the issue i ran into recently was around react/jsx where i wanted .tsx files server side.
might have to look into it again but there was an issue where some react/jsx/fragment bit had to be ported to esm first.
- WorldMaker 2y agoInteresting. Every example that I've seen of React SSR is all natively in ESM, but I've mostly only glanced at the big ones (Astro/Next/Nuxt). I'm sure that there are a lot of paths that aren't as well paved given how diverse the React SSR space currently is (there are way too many competing options), and how simple you want to try to keep your SSR (a lot of those options are just so complex today, which presumably is why there are so many competing options, everyone has a different idea of how complex to make the whole thing). (My own .tsx based view library doesn't yet have official SSR support, but I do all my testing in ESM in the built-in Node test runner `node --test` so I don't see any complications in doing .tsx on the "server-side", because that is how I'm testing everything already, I just haven't entirely figured out my "hydration" or "islands" or "stamps" approach so I don't officially support SSR yet. It's on the roadmap and I've made small bits of progress towards it, just need to solve it and haven't had the time/priority.)