Use SSR APIs for SFCs without build step or framework #6941
ghost
started this conversation in
General Discussions
Replies: 1 comment
-
Did you register your |
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.
Uh oh!
There was an error while loading. Please reload this page.
-
The SSR guide shows a simple example of taking a template as a string and rendering it to HTML, but ultimately leaves just about everything else as an exercise to the reader. Is there a vanilla Vue way to parse/compile an SFC at runtime? Unfortunately, the docs for the SFC compiler are a bit light as well 😆, so it's been difficult to see if there is a straight forward way to do this.
Here's what I'd like to achieve without using a build step or framework:
I'm looking into using Vue SFCs in a purely server-side use case, but it looks like everything either requires a build step or just points people at Vite or Nuxt, etc. Does Vue not have an officially supported / built-in way to achieve this? I can always parse the SFC and just grab the template tag, then pass that in as in the example above, but it seemed a bit hacky.
Appreciate any help or pointers in the right direction, thanks.
Beta Was this translation helpful? Give feedback.
All reactions