diff --git a/compiler/packages/babel-plugin-react-compiler/src/HIR/Environment.ts b/compiler/packages/babel-plugin-react-compiler/src/HIR/Environment.ts index 2a94eec79bdc0..499ce8de3db90 100644 --- a/compiler/packages/babel-plugin-react-compiler/src/HIR/Environment.ts +++ b/compiler/packages/babel-plugin-react-compiler/src/HIR/Environment.ts @@ -410,6 +410,17 @@ export function parseConfigPragma(pragma: string): EnvironmentConfig { continue; } + if ( + key === "enableChangeDetectionForDebugging" && + (val === undefined || val === "true") + ) { + maybeConfig[key] = { + source: "react-compiler-runtime", + importSpecifierName: "$structuralCheck", + }; + continue; + } + if (typeof defaultConfig[key as keyof EnvironmentConfig] !== "boolean") { // skip parsing non-boolean properties continue;