From 8c900bc9d06ec1c84d2bcd6f0d8ff458f3af34e4 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 8fe1c3183b..1d306f1630 100644 --- a/packages/schema/src/config/common.ts +++ b/packages/schema/src/config/common.ts @@ -247,12 +247,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.