mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-14 18:13:54 +00:00
22 lines
859 B
Markdown
22 lines
859 B
Markdown
---
|
|
title: "nuxi generate"
|
|
description: Pre-renders every route of the application and stores the result in plain HTML files.
|
|
---
|
|
|
|
# `nuxi generate`
|
|
|
|
```{bash}
|
|
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`
|
|
|
|
Option | Default | Description
|
|
-------------------------|-----------------|------------------
|
|
`rootDir` | `.` | The root directory of the application to generate
|
|
`--dotenv` | `.` | Point to another `.env` file to load, **relative** to the root directory.
|
|
|
|
::alert{type=info}
|
|
Read more about [pre-rendering and static hosting](/docs/1.getting-started/10.deployment.md#static-hosting).
|
|
::
|