From 9421052b46f1fab8f46569ade50a8a9c2d50c597 Mon Sep 17 00:00:00 2001 From: Edward Faulkner Date: Thu, 12 Sep 2024 00:18:22 +0100 Subject: [PATCH] incorporate dev mode into default macros config if NODE_ENV is set --- packages/compat/src/babel.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/compat/src/babel.ts b/packages/compat/src/babel.ts index ec478d88a..a744519f9 100644 --- a/packages/compat/src/babel.ts +++ b/packages/compat/src/babel.ts @@ -28,6 +28,10 @@ function loadCompatConfig(): CompatBabelState { let macros = MacrosConfig.for({}, process.cwd()); let { plugins: templateMacros, setConfig } = MacrosConfig.transforms(); setConfig(macros); + if (process.env.NODE_ENV === 'development') { + macros.enablePackageDevelopment(process.cwd()); + macros.enableRuntimeMode(); + } macros.finalize(); return { plugins: [],