⚠️
The vite-plugin-ssr project has been renamed Vike.
  • If you are already using vite-plugin-ssr then migrate to Vike.
  • For new projects, don't use vite-plugin-ssr but use Vike instead.

config.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:

  1. Client-side build (dist/client/).
  2. Server-side build (dist/server/).
  3. Pre-rendering (if pre-rendering is enabled).

When setting disableAutoFullBuild to true then only step 1 is executed. To run the full build, we then have to:

  • Run $ vite build, to build the client-side (dist/client/).
  • Run $ vite build --ssr, to build the server-side (dist/server/).
  • Run the pre-rendering programmatically, see API > 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 to true as it merely disables the automatic run of step 3.