File tree Expand file tree Collapse file tree 5 files changed +7
-5
lines changed Expand file tree Collapse file tree 5 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -81,6 +81,5 @@ module.exports = {
81
81
spyOnDev : true ,
82
82
spyOnDevAndProd : true ,
83
83
spyOnProd : true ,
84
- __PROFILER__ : true ,
85
84
} ,
86
85
} ;
Original file line number Diff line number Diff line change @@ -37,7 +37,8 @@ export const warnAboutDeprecatedLifecycles = false;
37
37
export const warnAboutLegacyContextAPI = false ;
38
38
39
39
// Gather advanced timing metrics for Profiler subtrees.
40
- export const enableProfilerTimer = __DEV__ || __PROFILER__ ;
40
+ export const enableProfilerTimer =
41
+ __DEV__ || process . env . REACT_ENABLE_PROFILING === true ;
41
42
42
43
// Fires getDerivedStateFromProps for state *or* props changes
43
44
export const fireGetDerivedStateFromPropsOnStateUpdates = true ;
Original file line number Diff line number Diff line change @@ -20,7 +20,8 @@ export const enableSuspense = false;
20
20
export const warnAboutDeprecatedLifecycles = false ;
21
21
export const warnAboutLegacyContextAPI = false ;
22
22
export const replayFailedUnitOfWorkWithInvokeGuardedCallback = __DEV__ ;
23
- export const enableProfilerTimer = __DEV__ || __PROFILER__ ;
23
+ export const enableProfilerTimer =
24
+ __DEV__ || process . env . REACT_ENABLE_PROFILING ;
24
25
export const fireGetDerivedStateFromPropsOnStateUpdates = true ;
25
26
26
27
// Only used in www builds.
Original file line number Diff line number Diff line change @@ -20,7 +20,8 @@ export const enableUserTimingAPI = __DEV__;
20
20
export const replayFailedUnitOfWorkWithInvokeGuardedCallback = __DEV__ ;
21
21
export const warnAboutDeprecatedLifecycles = false ;
22
22
export const warnAboutLegacyContextAPI = false ;
23
- export const enableProfilerTimer = __DEV__ || __PROFILER__ ;
23
+ export const enableProfilerTimer =
24
+ __DEV__ || process . env . REACT_ENABLE_PROFILING ;
24
25
export const fireGetDerivedStateFromPropsOnStateUpdates = true ;
25
26
26
27
// Only used in www builds.
Original file line number Diff line number Diff line change @@ -290,7 +290,7 @@ function getPlugins(
290
290
// Turn __DEV__ and process.env checks into constants.
291
291
replace ( {
292
292
__DEV__ : isProduction ? 'false' : 'true' ,
293
- __PROFILER__ : isProfiling ? 'true' : 'false' ,
293
+ 'process.env.REACT_ENABLE_PROFILING' : isProfiling ? 'true' : 'false' ,
294
294
'process.env.NODE_ENV' : isProduction ? "'production'" : "'development'" ,
295
295
} ) ,
296
296
// We still need CommonJS for external deps like object-assign.
You can’t perform that action at this time.
0 commit comments