Back to Nuxt

nuxt analyze

docs/4.api/4.commands/analyze.md

4.4.41.7 KB
Original Source
<!--analyze-cmd-->
bash
npx nuxt analyze [ROOTDIR] [--cwd=<directory>] [--logLevel=<silent|info|verbose>] [--dotenv] [-e, --extends=<layer-name>] [--name=<name>] [--no-serve]
<!--/analyze-cmd-->

The analyze command builds Nuxt and analyzes the production bundle (experimental).

Arguments

<!--analyze-args-->
ArgumentDescription
ROOTDIR="."Specifies the working directory (default: .)
<!--/analyze-args-->

Options

<!--analyze-opts-->
OptionDefaultDescription
--cwd=<directory>Specify the working directory, this takes precedence over ROOTDIR (default: .)
--logLevel=<silent|info|verbose>Specify build-time log level
--dotenvPath to .env file to load, relative to the root directory
-e, --extends=<layer-name>Extend from a Nuxt layer
--name=<name>defaultName of the analysis
--no-serveSkip serving the analysis results
<!--/analyze-opts-->

::note This command sets process.env.NODE_ENV to production. ::