Learn Nuxt with a Collection of 100+ Tips!

nuxi generate

Pre-renders every route of the application and stores the result in plain HTML files.
Terminal
npx nuxi generate [ROOTDIR] [--cwd=<directory>] [--logLevel=<silent|info|verbose>] [--preset] [--dotenv] [--envName]

The generate command pre-renders every route of your application and stores the result in plain HTML files that you can deploy on any static hosting services. The command triggers the nuxi build command with the prerender argument set to true

Arguments

ArgumentDescription
ROOTDIR="."Specifies the working directory (default: .)

Options

OptionDefaultDescription
--cwd=<directory>Specify the working directory, this takes precedence over ROOTDIR (default: .)
--logLevel=<silent|info|verbose>Specify build-time log level
--presetNitro server preset
--dotenvPath to .env file to load, relative to the root directory
--envNameThe environment to use when resolving configuration overrides (default is production when building, and development when running the dev server)
Read more about pre-rendering and static hosting.