Closed kslstn closed 3 years ago
@kslstn Well it mentions you need to install vite-ssr
as an NPM dependency, which also adds a small CLI to your project. As with any other local CLI, you need to run it as a script in package.json
, or prefix it with a tool that knows how to find the binary: yarn vite-ssr build
, npx vite-ssr build
.
In any case, Vite SSR is for rendering routes at runtime in your server (server side rendering). It does not support rendering at build time out of the box, and that's what you seem to be looking for.
I would suggest having a look at vite-ssg
, which has a similar API to vite-ssr.
Thank you! npx vite-ssr build
is a recognized command (I tried npm vite-ssr build
before, but that didn't work).
The readme says:
I wonder how? The readme doesn't mention installing a CLI.
Context: my production server isn't actually running the application—I want to prerender all routes of my application as html files and put them on basic Apache hosting.