Replies: 1 comment
-
Love this idea. The amount of effort needed to get SSR working today is way too much. It should be possible to compile an SFC Vue component, pass it props / data, and render it to an HTML string that can be passed back to the browser. Bonus points for easy hydration. |
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
Uh oh!
There was an error while loading. Please reload this page.
-
There are many mature server side nodejs web frameworks like express, fastify, nestjs, koa and hapi that can return any content in the http response. It's necessary to use a template language with them like handlebars, liquid, nunjucks or ejs to render html content. But they have many limitations:
Vue as templating language is good in all those things but can't be used for server side templating through simple API call to pass in props and get a string as output.
There should be a library extracted from Vue to just provide templating. Because it would be Vue it would always work well in editors.
Many features wouldn't need to be available in server side templating like reactivity. Compilation of template can be API function run at application build time for performance or startup. Vite dev server can be used to compile and hot reload template changes.
Beta Was this translation helpful? Give feedback.
All reactions