Skip to content

Commit

Permalink
Pass --mode flag to build (#6647)
Browse files Browse the repository at this point in the history
  • Loading branch information
bluwy authored Mar 24, 2023
1 parent 7daef9a commit 45da39a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/smart-wombats-peel.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'astro': patch
---

Fix --mode flag for builds
8 changes: 7 additions & 1 deletion packages/astro/src/cli/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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': {
Expand Down

0 comments on commit 45da39a

Please sign in to comment.