@@ -18,40 +18,44 @@ const bundleTypes = {
18
18
RN_FB_PROFILING : 'RN_FB_PROFILING' ,
19
19
} ;
20
20
21
- const UMD_DEV = bundleTypes . UMD_DEV ;
22
- const UMD_PROD = bundleTypes . UMD_PROD ;
23
- const UMD_PROFILING = bundleTypes . UMD_PROFILING ;
24
- const NODE_DEV = bundleTypes . NODE_DEV ;
25
- const NODE_PROD = bundleTypes . NODE_PROD ;
26
- const NODE_PROFILING = bundleTypes . NODE_PROFILING ;
27
- const FB_WWW_DEV = bundleTypes . FB_WWW_DEV ;
28
- const FB_WWW_PROD = bundleTypes . FB_WWW_PROD ;
29
- const FB_WWW_PROFILING = bundleTypes . FB_WWW_PROFILING ;
30
- const RN_OSS_DEV = bundleTypes . RN_OSS_DEV ;
31
- const RN_OSS_PROD = bundleTypes . RN_OSS_PROD ;
32
- const RN_OSS_PROFILING = bundleTypes . RN_OSS_PROFILING ;
33
- const RN_FB_DEV = bundleTypes . RN_FB_DEV ;
34
- const RN_FB_PROD = bundleTypes . RN_FB_PROD ;
35
- const RN_FB_PROFILING = bundleTypes . RN_FB_PROFILING ;
21
+ const {
22
+ UMD_DEV ,
23
+ UMD_PROD ,
24
+ UMD_PROFILING ,
25
+ NODE_DEV ,
26
+ NODE_PROD ,
27
+ NODE_PROFILING ,
28
+ FB_WWW_DEV ,
29
+ FB_WWW_PROD ,
30
+ FB_WWW_PROFILING ,
31
+ RN_OSS_DEV ,
32
+ RN_OSS_PROD ,
33
+ RN_OSS_PROFILING ,
34
+ RN_FB_DEV ,
35
+ RN_FB_PROD ,
36
+ RN_FB_PROFILING ,
37
+ } = bundleTypes ;
36
38
37
39
const moduleTypes = {
40
+ // React
38
41
ISOMORPHIC : 'ISOMORPHIC' ,
42
+ // Individual renderers. They bundle the reconciler. (e.g. ReactDOM)
39
43
RENDERER : 'RENDERER' ,
44
+ // Helper packages that access specific renderer's internals. (e.g. TestUtils)
40
45
RENDERER_UTILS : 'RENDERER_UTILS' ,
46
+ // Standalone reconciler for third-party renderers.
41
47
RECONCILER : 'RECONCILER' ,
48
+ // Non-Fiber implementations like SSR and Shallow renderers.
42
49
NON_FIBER_RENDERER : 'NON_FIBER_RENDERER' ,
43
50
} ;
44
51
45
- // React
46
- const ISOMORPHIC = moduleTypes . ISOMORPHIC ;
47
- // Individual renderers. They bundle the reconciler. (e.g. ReactDOM)
48
- const RENDERER = moduleTypes . RENDERER ;
49
- // Helper packages that access specific renderer's internals. (e.g. TestUtils)
50
- const RENDERER_UTILS = moduleTypes . RENDERER_UTILS ;
51
- // Standalone reconciler for third-party renderers.
52
- const RECONCILER = moduleTypes . RECONCILER ;
53
- // Non-Fiber implementations like SSR and Shallow renderers.
54
- const NON_FIBER_RENDERER = moduleTypes . NON_FIBER_RENDERER ;
52
+ const {
53
+ ISOMORPHIC ,
54
+ RENDERER ,
55
+ RENDERER_UTILS ,
56
+ RECONCILER ,
57
+ NON_FIBER_RENDERER ,
58
+ } = moduleTypes ;
55
59
56
60
const bundles = [
57
61
/******* Isomorphic *******/
@@ -150,7 +154,6 @@ const bundles = [
150
154
global : 'ReactDOMServer' ,
151
155
externals : [ 'react' ] ,
152
156
} ,
153
-
154
157
{
155
158
bundleTypes : [ NODE_DEV , NODE_PROD ] ,
156
159
moduleType : NON_FIBER_RENDERER ,
@@ -215,7 +218,6 @@ const bundles = [
215
218
'ReactNativeViewConfigRegistry' ,
216
219
] ,
217
220
} ,
218
-
219
221
{
220
222
bundleTypes : [ RN_OSS_DEV , RN_OSS_PROD , RN_OSS_PROFILING ] ,
221
223
moduleType : RENDERER ,
@@ -256,7 +258,6 @@ const bundles = [
256
258
'ReactNativeViewConfigRegistry' ,
257
259
] ,
258
260
} ,
259
-
260
261
{
261
262
bundleTypes : [ RN_OSS_DEV , RN_OSS_PROD , RN_OSS_PROFILING ] ,
262
263
moduleType : RENDERER ,
@@ -285,7 +286,6 @@ const bundles = [
285
286
global : 'ReactTestRenderer' ,
286
287
externals : [ 'react' , 'scheduler' , 'scheduler/unstable_mock' ] ,
287
288
} ,
288
-
289
289
{
290
290
bundleTypes : [ FB_WWW_DEV , NODE_DEV , NODE_PROD , UMD_DEV , UMD_PROD ] ,
291
291
moduleType : NON_FIBER_RENDERER ,
@@ -436,19 +436,16 @@ const bundles = [
436
436
437
437
/******* ESLint Plugin for Hooks (proposal) *******/
438
438
{
439
- // TODO: it's awkward to create a bundle for this
440
- // but if we don't, the package won't get copied.
441
- // We also can't create just DEV bundle because
442
- // it contains a NODE_ENV check inside.
443
- // We should probably tweak our build process
444
- // to allow "raw" packages that don't get bundled.
439
+ // TODO: it's awkward to create a bundle for this but if we don't, the package
440
+ // won't get copied. We also can't create just DEV bundle because it contains a
441
+ // NODE_ENV check inside. We should probably tweak our build process to allow
442
+ // "raw" packages that don't get bundled.
445
443
bundleTypes : [ NODE_DEV , NODE_PROD , FB_WWW_DEV ] ,
446
444
moduleType : ISOMORPHIC ,
447
445
entry : 'eslint-plugin-react-hooks' ,
448
446
global : 'ESLintPluginReactHooks' ,
449
447
externals : [ ] ,
450
448
} ,
451
-
452
449
{
453
450
bundleTypes : [
454
451
FB_WWW_DEV ,
@@ -588,6 +585,8 @@ function deepFreeze(o) {
588
585
589
586
// Don't accidentally mutate config as part of the build
590
587
deepFreeze ( bundles ) ;
588
+ deepFreeze ( bundleTypes ) ;
589
+ deepFreeze ( moduleTypes ) ;
591
590
592
591
module . exports = {
593
592
bundleTypes,
0 commit comments