Usage:

  • $ vike dev Start development server.
  • $ vike build Build for production.
  • $ vike preview Start preview server using production build.
  • $ vike prerender Pre-render pages.
  • $ vike -v Print Vike's installed version.

Vike's CLI doesn't have any options, instead:

  • change your vite.config.js file, or
  • use the VITE_CONFIG environment variable.

For example:

# Set Vite's server.host setting to true
$ VITE_CONFIG="{server:{host:true}}" vike dev
 
# When running Vike's CLI over a package.json script
$ VITE_CONFIG="{build:{outDir:'build'}}" npm run build

You can define VITE_CONFIG using JavaScript-like syntax, JSON syntax, or JSON5 syntax. (Vike uses JSON5 to parse VITE_CONFIG.)

See also