forked from gaearon/react-hot-loader
-
Notifications
You must be signed in to change notification settings - Fork 0
/
configuration.js
79 lines (57 loc) · 1.95 KB
/
configuration.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
const configuration = {
// Log level
logLevel: 'error',
// Allows using SFC without changes
pureSFC: true,
// keep render method unpatched, moving sideEffect to componentDidUpdate
pureRender: true,
// Allows SFC to be used, enables "intermediate" components used by Relay, should be disabled for Preact
allowSFC: true,
// Allow reload of effect hooks with non zero dependency list
reloadHooks: true,
// Allow reload of mount effect hooks - zero deps
reloadLifeCycleHooks: false,
// Enables hook reload on hook body change
reloadHooksOnBodyChange: true,
// Disable "hot-replacement-render"
disableHotRenderer: false,
// @private
integratedComparator: false,
// @private
integratedResolver: false,
// Disable "hot-replacement-render" when injection into react-dom is made
disableHotRendererWhenInjected: true,
// Controls `react-🔥-dom patch` notification
showReactDomPatchNotification: true,
// Hook on babel component register.
onComponentRegister: false,
// Hook on React renders for a first time component
onComponentCreate: false,
// flag to completely disable RHL for SFC. Probably don't use it without dom patch made.
ignoreSFC: false,
// ignoreSFC when injection into react-dom is made
ignoreSFCWhenInjected: true,
// flag to completely disable RHL for Components
ignoreComponents: false,
// default value for AppContainer errorOverlay
errorReporter: undefined,
// Global error overlay
ErrorOverlay: undefined,
// Actively track lazy loaded components
trackTailUpdates: true,
// react hot dom features enabled
IS_REACT_MERGE_ENABLED: false,
};
export const internalConfiguration = {
// control proxy creation
disableProxyCreation: false,
};
export const setConfiguration = config => {
// not using Object.assing for IE11 compliance
for (const i in config) {
if (config.hasOwnProperty(i)) {
configuration[i] = config[i];
}
}
};
export default configuration;