Files
gil-wiki/reference/4.api/4.commands/generate.md
gil 5f664546cf feat: 위키 저장소 초기 커밋
- CLAUDE.md 운영 규칙
- wiki/ 정리된 지식 페이지 (Nuxt + Claude Code)
- raw/ 원본 자료
- reference/ Nuxt 4.x 공식 문서

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-13 00:31:51 +09:00

3.0 KiB

title, description, links
title description links
nuxt generate Pre-renders every route of the application and stores the result in plain HTML files.
label icon to size
Source i-simple-icons-github https://github.com/nuxt/cli/blob/main/packages/nuxi/src/commands/generate.ts xs
npx nuxt generate [ROOTDIR] [--cwd=<directory>] [--logLevel=<silent|info|verbose>] [--preset] [--dotenv] [--envName] [-e, --extends=<layer-name>] [--profile[=verbose]]

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 nuxt build command with the prerender argument set to true

Arguments

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

Options

Option Default Description
--cwd=<directory> Specify the working directory, this takes precedence over ROOTDIR (default: .)
--logLevel=<silent|info|verbose> Specify build-time log level
--preset Nitro server preset
--dotenv Path to .env file to load, relative to the root directory
--envName The environment to use when resolving configuration overrides (default is production when building, and development when running the dev server)
-e, --extends=<layer-name> Extend from a Nuxt layer
--profile Profile performance (v4.4+). Writes a V8 CPU profile and JSON report on exit. Use --profile=verbose for a full console report.

::read-more{to="/docs/4.x/getting-started/deployment#static-hosting"} Read more about pre-rendering and static hosting. ::