You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am curious if you've thought about adding a way of rendering the views server-side instead of using Svelte? For example, using Go's templating system. I realize you lose out on the component capabilities of today's FE frameworks, but as someone who prefers server-side rendered apps, I think this would be a good feature to support. As mentioned it can be another variation that bud supports in addition to svelte, React and others.
The text was updated successfully, but these errors were encountered:
This is similar to what most other JS frameworks do, it works like this:
Create two builds: one for server, one for browser. Both are built using ESBuild. In development, builds happen lazily upon request, similar to how a CDN like esm.sh would build JS to be imported. This will hopefully allow the build system to scale for larger apps. Vite was my inspiration here, but it's all done in Go.
V8 and the Svelte compiler are baked into the bud binary. When a request comes in, V8 evaluates the compiler running the server-built page and returns HTML. That's a mouthful, hopefully that makes sense.
This was hard to do, but I couldn't live with the tradeoff of choosing between: a modern frontend language vs. performance, SEO and the website working without JS.
I should have shown it in the demo, but if you go through the HN demo, try running curl :3000 and you'll be overwhelmed with a beautiful HTML soup!
Watched the demo and it was pretty good!
I am curious if you've thought about adding a way of rendering the views server-side instead of using Svelte? For example, using Go's templating system. I realize you lose out on the component capabilities of today's FE frameworks, but as someone who prefers server-side rendered apps, I think this would be a good feature to support. As mentioned it can be another variation that bud supports in addition to svelte, React and others.
The text was updated successfully, but these errors were encountered: