2022-10-06 09:15:30 +00:00
|
|
|
---
|
|
|
|
title: "nuxi analyze"
|
|
|
|
description: "Analyze the production bundle or your Nuxt application."
|
2023-10-18 10:59:43 +00:00
|
|
|
links:
|
|
|
|
- label: Source
|
|
|
|
icon: i-simple-icons-github
|
|
|
|
to: https://github.com/nuxt/cli/blob/main/src/commands/analyze.ts
|
|
|
|
size: xs
|
2022-10-06 09:15:30 +00:00
|
|
|
---
|
2022-04-06 05:56:08 +00:00
|
|
|
|
2023-10-18 10:59:43 +00:00
|
|
|
```bash [Terminal]
|
2023-03-07 12:20:43 +00:00
|
|
|
npx nuxi analyze [--log-level] [rootDir]
|
2022-04-06 05:56:08 +00:00
|
|
|
```
|
|
|
|
|
2022-04-16 13:53:36 +00:00
|
|
|
The `analyze` command builds Nuxt and analyzes the production bundle (experimental).
|
2022-04-06 05:56:08 +00:00
|
|
|
|
|
|
|
Option | Default | Description
|
|
|
|
-------------------------|-----------------|------------------
|
|
|
|
`rootDir` | `.` | The directory of the target application.
|
2022-07-06 18:39:02 +00:00
|
|
|
|
2023-10-18 10:59:43 +00:00
|
|
|
::callout
|
2022-07-06 18:39:02 +00:00
|
|
|
This command sets `process.env.NODE_ENV` to `production`.
|
2023-10-18 10:59:43 +00:00
|
|
|
::
|