diff --git a/.changeset/smart-wombats-peel.md b/.changeset/smart-wombats-peel.md new file mode 100644 index 0000000000..6e5715b3b1 --- /dev/null +++ b/.changeset/smart-wombats-peel.md @@ -0,0 +1,5 @@ +--- +'astro': patch +--- + +Fix --mode flag for builds diff --git a/packages/astro/src/cli/index.ts b/packages/astro/src/cli/index.ts index 7cdff0305d..3af54bc3ef 100644 --- a/packages/astro/src/cli/index.ts +++ b/packages/astro/src/cli/index.ts @@ -218,7 +218,13 @@ async function runCommand(cmd: string, flags: yargs.Arguments) { case 'build': { const { default: build } = await import('../core/build/index.js'); - return await build(settings, { flags, logging, telemetry, teardownCompiler: true }); + return await build(settings, { + flags, + logging, + telemetry, + teardownCompiler: true, + mode: flags.mode, + }); } case 'check': {