diff --git a/packages/cli/src/commands/generate.js b/packages/cli/src/commands/generate.js index 2de34cae2d..52c5cbf18c 100644 --- a/packages/cli/src/commands/generate.js +++ b/packages/cli/src/commands/generate.js @@ -36,6 +36,13 @@ export default { }, async run(cmd) { const config = await cmd.getNuxtConfig({ dev: false }) + + // Disable analyze if set by the nuxt config + if (!config.build) { + config.build = {} + } + config.build.analyze = false + const nuxt = await cmd.getNuxt(config) const generator = await cmd.getGenerator(nuxt)