2026-07-08 11:46:56 -04:00
|
|
|
// Dev-tools gate. Explicit opt-in via REACT_APP_DEV_TOOLS=1.
|
|
|
|
|
// Safe default: any value other than exactly '1' = off.
|
2026-07-08 23:07:04 -04:00
|
|
|
// Dynamic key access (process.env[KEY]) so react-scripts DefinePlugin does NOT
|
|
|
|
|
// inline the value at build time — allows tests + runtime env changes to take
|
|
|
|
|
// effect. DefinePlugin only replaces static member access, never computed lookups.
|
|
|
|
|
const KEY = 'REACT_APP_DEV_TOOLS';
|
2026-07-08 11:46:56 -04:00
|
|
|
export const isDevToolsEnabled = () => process.env[KEY] === '1';
|