From 09c3f79eff714416e01de14f9ac432d905fff5e8 Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Mon, 20 Jan 2025 13:42:31 +0000 Subject: [PATCH] fix(schema): allow overriding `dev`/`test` environment value (#30667) --- packages/schema/src/config/common.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/schema/src/config/common.ts b/packages/schema/src/config/common.ts index c07110ce81..2d688c2aee 100644 --- a/packages/schema/src/config/common.ts +++ b/packages/schema/src/config/common.ts @@ -244,12 +244,16 @@ export default defineUntypedSchema({ * * Normally, you should not need to set this. */ - dev: Boolean(isDevelopment), + dev: { + $resolve: val => val ?? Boolean(isDevelopment), + }, /** * Whether your app is being unit tested. */ - test: Boolean(isTest), + test: { + $resolve: val => val ?? Boolean(isTest), + }, /** * Set to `true` to enable debug mode.