From 4c9047ccff329c86d38e968436bebf88d49c18bb Mon Sep 17 00:00:00 2001 From: Ezra Ashenafi Date: Tue, 22 Oct 2024 14:34:36 +0300 Subject: [PATCH] fix(build): respect environment variable preset overrides (#514) --- src/commands/build.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/commands/build.ts b/src/commands/build.ts index e788d684..e26452a5 100644 --- a/src/commands/build.ts +++ b/src/commands/build.ts @@ -39,7 +39,7 @@ export default defineCommand({ const kit = await loadKit(cwd) - const nitroPreset = ctx.args.prerender ? 'static' : ctx.args.preset + const nitroPreset = ctx.args.prerender ? 'static' : ctx.args.preset || process.env.NITRO_PRESET || process.env.SERVER_PRESET if (nitroPreset) { if (ctx.args.prerender && ctx.args.preset) { consola.warn(`\`--prerender\` is set. Ignoring \`--preset ${ctx.args.preset}\``)