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] [--dotenv]

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

OptionDefaultDescription
rootDir.The root directory of the application to generate
--dotenv.Point to another .env file to load, relative to the root directory.
Read more about pre-rendering and static hosting.