2

I have a very basic setup for Svelte with ViteJS for a single-page app that requires no routing and has all dependencies inlined by the vite-plugin-singlefile plugin.

The one thing that I cannot get to work is pre-rendered markup.

I would like to have the single-page app pre-rendered at build time, with the initial markup inlined in index.html for SEO, and hydration on the client side.

The vite-ssr-plugin seems to be targeting this scenario but incompatible with vite-plugin-singlefile. It generates a whole bunch of client / server files when used alone.

sveltekit on the other hand seems to be targeting more advanced scenarios and also generates a myriad of output files.

Is there any simpler solution?

John Goofy
  • 866
  • 8
  • 22

0 Answers0