Skip to content

Commit

Permalink
fix(build): respect environment variable preset overrides (#514)
Browse files Browse the repository at this point in the history
  • Loading branch information
Eazash authored Oct 22, 2024
1 parent d6d2f1b commit 4c9047c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/commands/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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}\``)
Expand Down

0 comments on commit 4c9047c

Please sign in to comment.