Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7d0ea883b0 | ||
|
|
5c062bf944 |
@@ -1,6 +1,7 @@
|
|||||||
// Dev-tools gate. Explicit opt-in via REACT_APP_DEV_TOOLS=1.
|
// Dev-tools gate. Explicit opt-in via REACT_APP_DEV_TOOLS=1.
|
||||||
// Safe default: any value other than exactly '1' = off.
|
// Safe default: any value other than exactly '1' = off.
|
||||||
// Dynamic key access so react-scripts DefinePlugin does NOT inline the value
|
// Dynamic key access (process.env[KEY]) so react-scripts DefinePlugin does NOT
|
||||||
// at build time — allows tests + runtime env changes to take effect.
|
// inline the value at build time — allows tests + runtime env changes to take
|
||||||
const KEY = 'REACT_APP_' + 'DEV_TOOLS';
|
// effect. DefinePlugin only replaces static member access, never computed lookups.
|
||||||
|
const KEY = 'REACT_APP_DEV_TOOLS';
|
||||||
export const isDevToolsEnabled = () => process.env[KEY] === '1';
|
export const isDevToolsEnabled = () => process.env[KEY] === '1';
|
||||||
|
|||||||
Reference in New Issue
Block a user