0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2024-12-23 21:53:55 -05:00

Pass --mode flag to build (#6647)

This commit is contained in:
Bjorn Lu 2023-03-24 23:17:46 +08:00 committed by GitHub
parent 7daef9a299
commit 45da39a864
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 1 deletions

View file

@ -0,0 +1,5 @@
---
'astro': patch
---
Fix --mode flag for builds

View file

@ -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': {