Most configuration options are covered in the sections relating to them.
Below is a quick reference of all options and their default values.
Whether or not to run Vite's development server
The Vite client app's source root
Global Data hydration key
Route Payloads hydration key
Isomorphic Data hydration key
Callback function called to determine which paths should be prerendered in the initial statically generated build (more can be added via the live generate server)
If none provided, static paths are inferred from the
Callback function called when an URL gets generated (or regenerated) via the live static generation server API
As explained in Vite's documentation, a Vite SSR application requires you to build both a client and a server bundle. Since fastify-vite makes your Fastify server recognize
generate commands, it also lets you configure client and server entry points.
In plain Vite SSR projects, the server entry point is not something you configure, but rather pass in to Vite's
index.html is what is delivered to the browser if you're not performing SSR — but if you are, it gets replaced by what is dynamically generated (SSR) from the server.
Vite server entry point
Vite client entry point
fastify-vite tries to intefere as little as possible in configuring your Vite apps.
So if you want to just have
vite.config.js for all Vite settings, that will just work as expected.
However, you can also use the
Vite configuration options
You must use one or the other, as there's no way to reliably merge the order of plugins if there are two sources of configuration.