Quantcast
Channel: Active questions tagged svelte - Stack Overflow
Viewing all articles
Browse latest Browse all 1879

Minimal svelte + vitejs configuration for pre-rendered single-page app?

$
0
0

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?


Viewing all articles
Browse latest Browse all 1879

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>