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
|
|
|
|
2024-12-18 10:29:56 +00:00
|
|
|
<!--analyze-cmd-->
|
2023-10-18 10:59:43 +00:00
|
|
|
```bash [Terminal]
|
2024-12-18 10:29:56 +00:00
|
|
|
npx nuxi analyze [ROOTDIR] [--cwd=<directory>] [--logLevel=<silent|info|verbose>] [--dotenv] [--name=<name>] [--no-serve]
|
2022-04-06 05:56:08 +00:00
|
|
|
```
|
2024-12-18 10:29:56 +00:00
|
|
|
<!--/analyze-cmd-->
|
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
|
|
|
|
2024-12-18 10:29:56 +00:00
|
|
|
## Arguments
|
|
|
|
|
|
|
|
<!--analyze-args-->
|
|
|
|
Argument | Description
|
|
|
|
--- | ---
|
|
|
|
`ROOTDIR="."` | Specifies the working directory (default: `.`)
|
|
|
|
<!--/analyze-args-->
|
|
|
|
|
|
|
|
## Options
|
|
|
|
|
|
|
|
<!--analyze-opts-->
|
|
|
|
Option | Default | Description
|
|
|
|
--- | --- | ---
|
|
|
|
`--cwd=<directory>` | | Specify the working directory, this takes precedence over ROOTDIR (default: `.`)
|
|
|
|
`--logLevel=<silent\|info\|verbose>` | | Specify build-time log level
|
|
|
|
`--dotenv` | | Path to `.env` file to load, relative to the root directory
|
|
|
|
`--name=<name>` | `default` | Name of the analysis
|
|
|
|
`--no-serve` | | Skip serving the analysis results
|
|
|
|
<!--/analyze-opts-->
|
2022-07-06 18:39:02 +00:00
|
|
|
|
2024-02-21 17:09:45 +00:00
|
|
|
::note
|
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
|
|
|
::
|