disableAutoFullBuild
Set to true
to disable the automatic chaining of all build steps.
// vite.config.js
import { ssr } from 'vite-plugin-ssr/plugin'
export default {
plugins: [
ssr({
disableAutoFullBuild: true
})
]
}
Running $ vite build
executes three build steps:
dist/client/
).dist/server/
).When setting disableAutoFullBuild
to true
then only step 1
is executed. To run the full build, we then have to:
$ vite build
, to build the client-side (dist/client/
).$ vite build --ssr
, to build the server-side (dist/server/
).prerender()
programmatic.We use
disableAutoFullBuild
when we want fine grain programmatic control over the build process.
If our goal is to programmatically run pre-rendering then, instead, we can set
prerender.disableAutoRun
totrue
as it merely disables the automatic run of step3
.