From 45da39a8642d64eb318840b18dfc2b5ccc6561bc Mon Sep 17 00:00:00 2001 From: Bjorn Lu Date: Fri, 24 Mar 2023 23:17:46 +0800 Subject: [PATCH] Pass --mode flag to build (#6647) --- .changeset/smart-wombats-peel.md | 5 +++++ packages/astro/src/cli/index.ts | 8 +++++++- 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 .changeset/smart-wombats-peel.md 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': {