2017-04-05 16:47:29 +01:00
|
|
|
'use strict';
|
|
|
|
|
|
|
|
|
|
const bundleTypes = {
|
|
|
|
|
UMD_DEV: 'UMD_DEV',
|
|
|
|
|
UMD_PROD: 'UMD_PROD',
|
|
|
|
|
NODE_DEV: 'NODE_DEV',
|
|
|
|
|
NODE_PROD: 'NODE_PROD',
|
2018-04-18 13:16:50 -07:00
|
|
|
FB_WWW_DEV: 'FB_WWW_DEV',
|
|
|
|
|
FB_WWW_PROD: 'FB_WWW_PROD',
|
|
|
|
|
RN_OSS_DEV: 'RN_OSS_DEV',
|
|
|
|
|
RN_OSS_PROD: 'RN_OSS_PROD',
|
|
|
|
|
RN_FB_DEV: 'RN_FB_DEV',
|
|
|
|
|
RN_FB_PROD: 'RN_FB_PROD',
|
2017-04-05 16:47:29 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const UMD_DEV = bundleTypes.UMD_DEV;
|
|
|
|
|
const UMD_PROD = bundleTypes.UMD_PROD;
|
|
|
|
|
const NODE_DEV = bundleTypes.NODE_DEV;
|
|
|
|
|
const NODE_PROD = bundleTypes.NODE_PROD;
|
2018-04-18 13:16:50 -07:00
|
|
|
const FB_WWW_DEV = bundleTypes.FB_WWW_DEV;
|
|
|
|
|
const FB_WWW_PROD = bundleTypes.FB_WWW_PROD;
|
|
|
|
|
const RN_OSS_DEV = bundleTypes.RN_OSS_DEV;
|
|
|
|
|
const RN_OSS_PROD = bundleTypes.RN_OSS_PROD;
|
|
|
|
|
const RN_FB_DEV = bundleTypes.RN_FB_DEV;
|
|
|
|
|
const RN_FB_PROD = bundleTypes.RN_FB_PROD;
|
2017-04-05 16:47:29 +01:00
|
|
|
|
2017-10-11 14:29:26 -04:00
|
|
|
const moduleTypes = {
|
|
|
|
|
ISOMORPHIC: 'ISOMORPHIC',
|
|
|
|
|
RENDERER: 'RENDERER',
|
Reorganize code structure (#11288)
* Move files and tests to more meaningful places
* Fix the build
Now that we import reconciler via react-reconciler, I needed to make a few tweaks.
* Update sizes
* Move @preventMunge directive to FB header
* Revert unintentional change
* Fix Flow coverage
I forgot to @flow-ify those files. This uncovered some issues.
* Prettier, I love you but you're bringing me down
Prettier, I love you but you're bringing me down
Like a rat in a cage
Pulling minimum wage
Prettier, I love you but you're bringing me down
Prettier, you're safer and you're wasting my time
Our records all show you were filthy but fine
But they shuttered your stores
When you opened the doors
To the cops who were bored once they'd run out of crime
Prettier, you're perfect, oh, please don't change a thing
Your mild billionaire mayor's now convinced he's a king
So the boring collect
I mean all disrespect
In the neighborhood bars I'd once dreamt I would drink
Prettier, I love you but you're freaking me out
There's a ton of the twist but we're fresh out of shout
Like a death in the hall
That you hear through your wall
Prettier, I love you but you're freaking me out
Prettier, I love you but you're bringing me down
Prettier, I love you but you're bringing me down
Like a death of the heart
Jesus, where do I start?
But you're still the one pool where I'd happily drown
And oh! Take me off your mailing list
For kids who think it still exists
Yes, for those who think it still exists
Maybe I'm wrong and maybe you're right
Maybe I'm wrong and maybe you're right
Maybe you're right, maybe I'm wrong
And just maybe you're right
And oh! Maybe mother told you true
And there'll always be somebody there for you
And you'll never be alone
But maybe she's wrong and maybe I'm right
And just maybe she's wrong
Maybe she's wrong and maybe I'm right
And if so, here's this song!
2017-10-19 19:50:24 +01:00
|
|
|
RENDERER_UTILS: 'RENDERER_UTILS',
|
2017-10-11 14:29:26 -04:00
|
|
|
RECONCILER: 'RECONCILER',
|
2018-05-19 11:29:11 +01:00
|
|
|
NON_FIBER_RENDERER: 'NON_FIBER_RENDERER',
|
2017-10-11 14:29:26 -04:00
|
|
|
};
|
|
|
|
|
|
Reorganize code structure (#11288)
* Move files and tests to more meaningful places
* Fix the build
Now that we import reconciler via react-reconciler, I needed to make a few tweaks.
* Update sizes
* Move @preventMunge directive to FB header
* Revert unintentional change
* Fix Flow coverage
I forgot to @flow-ify those files. This uncovered some issues.
* Prettier, I love you but you're bringing me down
Prettier, I love you but you're bringing me down
Like a rat in a cage
Pulling minimum wage
Prettier, I love you but you're bringing me down
Prettier, you're safer and you're wasting my time
Our records all show you were filthy but fine
But they shuttered your stores
When you opened the doors
To the cops who were bored once they'd run out of crime
Prettier, you're perfect, oh, please don't change a thing
Your mild billionaire mayor's now convinced he's a king
So the boring collect
I mean all disrespect
In the neighborhood bars I'd once dreamt I would drink
Prettier, I love you but you're freaking me out
There's a ton of the twist but we're fresh out of shout
Like a death in the hall
That you hear through your wall
Prettier, I love you but you're freaking me out
Prettier, I love you but you're bringing me down
Prettier, I love you but you're bringing me down
Like a death of the heart
Jesus, where do I start?
But you're still the one pool where I'd happily drown
And oh! Take me off your mailing list
For kids who think it still exists
Yes, for those who think it still exists
Maybe I'm wrong and maybe you're right
Maybe I'm wrong and maybe you're right
Maybe you're right, maybe I'm wrong
And just maybe you're right
And oh! Maybe mother told you true
And there'll always be somebody there for you
And you'll never be alone
But maybe she's wrong and maybe I'm right
And just maybe she's wrong
Maybe she's wrong and maybe I'm right
And if so, here's this song!
2017-10-19 19:50:24 +01:00
|
|
|
// React
|
2017-10-11 14:29:26 -04:00
|
|
|
const ISOMORPHIC = moduleTypes.ISOMORPHIC;
|
Reorganize code structure (#11288)
* Move files and tests to more meaningful places
* Fix the build
Now that we import reconciler via react-reconciler, I needed to make a few tweaks.
* Update sizes
* Move @preventMunge directive to FB header
* Revert unintentional change
* Fix Flow coverage
I forgot to @flow-ify those files. This uncovered some issues.
* Prettier, I love you but you're bringing me down
Prettier, I love you but you're bringing me down
Like a rat in a cage
Pulling minimum wage
Prettier, I love you but you're bringing me down
Prettier, you're safer and you're wasting my time
Our records all show you were filthy but fine
But they shuttered your stores
When you opened the doors
To the cops who were bored once they'd run out of crime
Prettier, you're perfect, oh, please don't change a thing
Your mild billionaire mayor's now convinced he's a king
So the boring collect
I mean all disrespect
In the neighborhood bars I'd once dreamt I would drink
Prettier, I love you but you're freaking me out
There's a ton of the twist but we're fresh out of shout
Like a death in the hall
That you hear through your wall
Prettier, I love you but you're freaking me out
Prettier, I love you but you're bringing me down
Prettier, I love you but you're bringing me down
Like a death of the heart
Jesus, where do I start?
But you're still the one pool where I'd happily drown
And oh! Take me off your mailing list
For kids who think it still exists
Yes, for those who think it still exists
Maybe I'm wrong and maybe you're right
Maybe I'm wrong and maybe you're right
Maybe you're right, maybe I'm wrong
And just maybe you're right
And oh! Maybe mother told you true
And there'll always be somebody there for you
And you'll never be alone
But maybe she's wrong and maybe I'm right
And just maybe she's wrong
Maybe she's wrong and maybe I'm right
And if so, here's this song!
2017-10-19 19:50:24 +01:00
|
|
|
// Individual renderers. They bundle the reconciler. (e.g. ReactDOM)
|
2017-10-11 14:29:26 -04:00
|
|
|
const RENDERER = moduleTypes.RENDERER;
|
Reorganize code structure (#11288)
* Move files and tests to more meaningful places
* Fix the build
Now that we import reconciler via react-reconciler, I needed to make a few tweaks.
* Update sizes
* Move @preventMunge directive to FB header
* Revert unintentional change
* Fix Flow coverage
I forgot to @flow-ify those files. This uncovered some issues.
* Prettier, I love you but you're bringing me down
Prettier, I love you but you're bringing me down
Like a rat in a cage
Pulling minimum wage
Prettier, I love you but you're bringing me down
Prettier, you're safer and you're wasting my time
Our records all show you were filthy but fine
But they shuttered your stores
When you opened the doors
To the cops who were bored once they'd run out of crime
Prettier, you're perfect, oh, please don't change a thing
Your mild billionaire mayor's now convinced he's a king
So the boring collect
I mean all disrespect
In the neighborhood bars I'd once dreamt I would drink
Prettier, I love you but you're freaking me out
There's a ton of the twist but we're fresh out of shout
Like a death in the hall
That you hear through your wall
Prettier, I love you but you're freaking me out
Prettier, I love you but you're bringing me down
Prettier, I love you but you're bringing me down
Like a death of the heart
Jesus, where do I start?
But you're still the one pool where I'd happily drown
And oh! Take me off your mailing list
For kids who think it still exists
Yes, for those who think it still exists
Maybe I'm wrong and maybe you're right
Maybe I'm wrong and maybe you're right
Maybe you're right, maybe I'm wrong
And just maybe you're right
And oh! Maybe mother told you true
And there'll always be somebody there for you
And you'll never be alone
But maybe she's wrong and maybe I'm right
And just maybe she's wrong
Maybe she's wrong and maybe I'm right
And if so, here's this song!
2017-10-19 19:50:24 +01:00
|
|
|
// Helper packages that access specific renderer's internals. (e.g. TestUtils)
|
|
|
|
|
const RENDERER_UTILS = moduleTypes.RENDERER_UTILS;
|
|
|
|
|
// Standalone reconciler for third-party renderers.
|
2017-10-11 14:29:26 -04:00
|
|
|
const RECONCILER = moduleTypes.RECONCILER;
|
2018-05-19 11:29:11 +01:00
|
|
|
// Non-Fiber implementations like SSR and Shallow renderers.
|
|
|
|
|
const NON_FIBER_RENDERER = moduleTypes.NON_FIBER_RENDERER;
|
2017-10-11 14:29:26 -04:00
|
|
|
|
2017-04-05 16:47:29 +01:00
|
|
|
const bundles = [
|
|
|
|
|
/******* Isomorphic *******/
|
|
|
|
|
{
|
2017-10-25 02:55:00 +03:00
|
|
|
label: 'core',
|
2018-04-18 13:16:50 -07:00
|
|
|
bundleTypes: [
|
|
|
|
|
UMD_DEV,
|
|
|
|
|
UMD_PROD,
|
|
|
|
|
NODE_DEV,
|
|
|
|
|
NODE_PROD,
|
|
|
|
|
FB_WWW_DEV,
|
|
|
|
|
FB_WWW_PROD,
|
|
|
|
|
],
|
2017-10-11 14:29:26 -04:00
|
|
|
moduleType: ISOMORPHIC,
|
2017-10-25 02:55:00 +03:00
|
|
|
entry: 'react',
|
|
|
|
|
global: 'React',
|
|
|
|
|
externals: [],
|
2017-04-05 16:47:29 +01:00
|
|
|
},
|
|
|
|
|
|
|
|
|
|
/******* React DOM *******/
|
|
|
|
|
{
|
2017-10-25 02:55:00 +03:00
|
|
|
label: 'dom-client',
|
2018-04-18 13:16:50 -07:00
|
|
|
bundleTypes: [
|
|
|
|
|
UMD_DEV,
|
|
|
|
|
UMD_PROD,
|
|
|
|
|
NODE_DEV,
|
|
|
|
|
NODE_PROD,
|
|
|
|
|
FB_WWW_DEV,
|
|
|
|
|
FB_WWW_PROD,
|
|
|
|
|
],
|
2017-10-11 14:29:26 -04:00
|
|
|
moduleType: RENDERER,
|
2017-10-25 02:55:00 +03:00
|
|
|
entry: 'react-dom',
|
|
|
|
|
global: 'ReactDOM',
|
|
|
|
|
externals: ['react'],
|
2017-04-19 16:45:31 -07:00
|
|
|
},
|
2017-10-25 02:55:00 +03:00
|
|
|
|
|
|
|
|
//******* Test Utils *******/
|
2017-04-19 16:45:31 -07:00
|
|
|
{
|
2017-10-25 02:55:00 +03:00
|
|
|
label: 'dom-test-utils',
|
Reorganize code structure (#11288)
* Move files and tests to more meaningful places
* Fix the build
Now that we import reconciler via react-reconciler, I needed to make a few tweaks.
* Update sizes
* Move @preventMunge directive to FB header
* Revert unintentional change
* Fix Flow coverage
I forgot to @flow-ify those files. This uncovered some issues.
* Prettier, I love you but you're bringing me down
Prettier, I love you but you're bringing me down
Like a rat in a cage
Pulling minimum wage
Prettier, I love you but you're bringing me down
Prettier, you're safer and you're wasting my time
Our records all show you were filthy but fine
But they shuttered your stores
When you opened the doors
To the cops who were bored once they'd run out of crime
Prettier, you're perfect, oh, please don't change a thing
Your mild billionaire mayor's now convinced he's a king
So the boring collect
I mean all disrespect
In the neighborhood bars I'd once dreamt I would drink
Prettier, I love you but you're freaking me out
There's a ton of the twist but we're fresh out of shout
Like a death in the hall
That you hear through your wall
Prettier, I love you but you're freaking me out
Prettier, I love you but you're bringing me down
Prettier, I love you but you're bringing me down
Like a death of the heart
Jesus, where do I start?
But you're still the one pool where I'd happily drown
And oh! Take me off your mailing list
For kids who think it still exists
Yes, for those who think it still exists
Maybe I'm wrong and maybe you're right
Maybe I'm wrong and maybe you're right
Maybe you're right, maybe I'm wrong
And just maybe you're right
And oh! Maybe mother told you true
And there'll always be somebody there for you
And you'll never be alone
But maybe she's wrong and maybe I'm right
And just maybe she's wrong
Maybe she's wrong and maybe I'm right
And if so, here's this song!
2017-10-19 19:50:24 +01:00
|
|
|
moduleType: RENDERER_UTILS,
|
2018-04-18 13:16:50 -07:00
|
|
|
bundleTypes: [FB_WWW_DEV, NODE_DEV, NODE_PROD, UMD_DEV, UMD_PROD],
|
2017-10-25 02:55:00 +03:00
|
|
|
entry: 'react-dom/test-utils',
|
|
|
|
|
global: 'ReactTestUtils',
|
|
|
|
|
externals: ['react', 'react-dom'],
|
2017-04-05 16:47:29 +01:00
|
|
|
},
|
2017-10-25 02:55:00 +03:00
|
|
|
|
2017-07-11 18:27:26 -07:00
|
|
|
/* React DOM internals required for react-native-web (e.g., to shim native events from react-dom) */
|
|
|
|
|
{
|
2017-10-25 02:55:00 +03:00
|
|
|
label: 'dom-unstable-native-dependencies',
|
2018-04-18 13:16:50 -07:00
|
|
|
bundleTypes: [
|
|
|
|
|
UMD_DEV,
|
|
|
|
|
UMD_PROD,
|
|
|
|
|
NODE_DEV,
|
|
|
|
|
NODE_PROD,
|
|
|
|
|
FB_WWW_DEV,
|
|
|
|
|
FB_WWW_PROD,
|
|
|
|
|
],
|
Reorganize code structure (#11288)
* Move files and tests to more meaningful places
* Fix the build
Now that we import reconciler via react-reconciler, I needed to make a few tweaks.
* Update sizes
* Move @preventMunge directive to FB header
* Revert unintentional change
* Fix Flow coverage
I forgot to @flow-ify those files. This uncovered some issues.
* Prettier, I love you but you're bringing me down
Prettier, I love you but you're bringing me down
Like a rat in a cage
Pulling minimum wage
Prettier, I love you but you're bringing me down
Prettier, you're safer and you're wasting my time
Our records all show you were filthy but fine
But they shuttered your stores
When you opened the doors
To the cops who were bored once they'd run out of crime
Prettier, you're perfect, oh, please don't change a thing
Your mild billionaire mayor's now convinced he's a king
So the boring collect
I mean all disrespect
In the neighborhood bars I'd once dreamt I would drink
Prettier, I love you but you're freaking me out
There's a ton of the twist but we're fresh out of shout
Like a death in the hall
That you hear through your wall
Prettier, I love you but you're freaking me out
Prettier, I love you but you're bringing me down
Prettier, I love you but you're bringing me down
Like a death of the heart
Jesus, where do I start?
But you're still the one pool where I'd happily drown
And oh! Take me off your mailing list
For kids who think it still exists
Yes, for those who think it still exists
Maybe I'm wrong and maybe you're right
Maybe I'm wrong and maybe you're right
Maybe you're right, maybe I'm wrong
And just maybe you're right
And oh! Maybe mother told you true
And there'll always be somebody there for you
And you'll never be alone
But maybe she's wrong and maybe I'm right
And just maybe she's wrong
Maybe she's wrong and maybe I'm right
And if so, here's this song!
2017-10-19 19:50:24 +01:00
|
|
|
moduleType: RENDERER_UTILS,
|
2017-10-25 02:55:00 +03:00
|
|
|
entry: 'react-dom/unstable-native-dependencies',
|
|
|
|
|
global: 'ReactDOMUnstableNativeDependencies',
|
|
|
|
|
externals: ['react', 'react-dom'],
|
2017-07-11 18:27:26 -07:00
|
|
|
},
|
2017-04-05 16:47:29 +01:00
|
|
|
|
|
|
|
|
/******* React DOM Server *******/
|
2017-05-17 17:19:11 -07:00
|
|
|
{
|
2017-10-25 02:55:00 +03:00
|
|
|
label: 'dom-server-browser',
|
2018-04-18 13:16:50 -07:00
|
|
|
bundleTypes: [
|
|
|
|
|
UMD_DEV,
|
|
|
|
|
UMD_PROD,
|
|
|
|
|
NODE_DEV,
|
|
|
|
|
NODE_PROD,
|
|
|
|
|
FB_WWW_DEV,
|
|
|
|
|
FB_WWW_PROD,
|
|
|
|
|
],
|
2018-05-19 11:29:11 +01:00
|
|
|
moduleType: NON_FIBER_RENDERER,
|
2017-10-25 02:55:00 +03:00
|
|
|
entry: 'react-dom/server.browser',
|
|
|
|
|
global: 'ReactDOMServer',
|
|
|
|
|
externals: ['react'],
|
2017-04-05 16:47:29 +01:00
|
|
|
},
|
|
|
|
|
|
2017-06-24 22:31:42 -07:00
|
|
|
{
|
2017-10-25 02:55:00 +03:00
|
|
|
label: 'dom-server-node',
|
2017-06-28 16:13:58 -07:00
|
|
|
bundleTypes: [NODE_DEV, NODE_PROD],
|
2018-05-19 11:29:11 +01:00
|
|
|
moduleType: NON_FIBER_RENDERER,
|
2017-10-25 02:55:00 +03:00
|
|
|
entry: 'react-dom/server.node',
|
|
|
|
|
externals: ['react', 'stream'],
|
2017-06-24 22:31:42 -07:00
|
|
|
},
|
|
|
|
|
|
2017-04-05 16:47:29 +01:00
|
|
|
/******* React ART *******/
|
|
|
|
|
{
|
2017-10-25 02:55:00 +03:00
|
|
|
label: 'art',
|
2018-04-18 13:16:50 -07:00
|
|
|
bundleTypes: [
|
|
|
|
|
UMD_DEV,
|
|
|
|
|
UMD_PROD,
|
|
|
|
|
NODE_DEV,
|
|
|
|
|
NODE_PROD,
|
|
|
|
|
FB_WWW_DEV,
|
|
|
|
|
FB_WWW_PROD,
|
|
|
|
|
],
|
2017-10-11 14:29:26 -04:00
|
|
|
moduleType: RENDERER,
|
2017-10-25 02:55:00 +03:00
|
|
|
entry: 'react-art',
|
|
|
|
|
global: 'ReactART',
|
|
|
|
|
externals: ['react'],
|
|
|
|
|
babel: opts =>
|
|
|
|
|
Object.assign({}, opts, {
|
|
|
|
|
// Include JSX
|
|
|
|
|
presets: opts.presets.concat([require.resolve('babel-preset-react')]),
|
|
|
|
|
}),
|
2017-04-05 16:47:29 +01:00
|
|
|
},
|
|
|
|
|
|
|
|
|
|
/******* React Native *******/
|
2018-04-18 13:16:50 -07:00
|
|
|
{
|
|
|
|
|
label: 'native-fb',
|
|
|
|
|
bundleTypes: [RN_FB_DEV, RN_FB_PROD],
|
|
|
|
|
moduleType: RENDERER,
|
|
|
|
|
entry: 'react-native-renderer',
|
|
|
|
|
global: 'ReactNativeRenderer',
|
|
|
|
|
externals: [
|
|
|
|
|
'ExceptionsManager',
|
|
|
|
|
'InitializeCore',
|
|
|
|
|
'Platform',
|
|
|
|
|
'RCTEventEmitter',
|
|
|
|
|
'TextInputState',
|
|
|
|
|
'UIManager',
|
|
|
|
|
'deepDiffer',
|
|
|
|
|
'deepFreezeAndThrowOnMutationInDev',
|
|
|
|
|
'flattenStyle',
|
|
|
|
|
'ReactNativeViewConfigRegistry',
|
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
|
2017-04-05 16:47:29 +01:00
|
|
|
{
|
2017-10-25 02:55:00 +03:00
|
|
|
label: 'native',
|
2018-04-18 13:16:50 -07:00
|
|
|
bundleTypes: [RN_OSS_DEV, RN_OSS_PROD],
|
2017-10-25 02:55:00 +03:00
|
|
|
moduleType: RENDERER,
|
|
|
|
|
entry: 'react-native-renderer',
|
|
|
|
|
global: 'ReactNativeRenderer',
|
2017-04-05 16:47:29 +01:00
|
|
|
externals: [
|
|
|
|
|
'ExceptionsManager',
|
|
|
|
|
'InitializeCore',
|
2017-08-31 15:27:54 -07:00
|
|
|
'Platform',
|
2017-04-05 16:47:29 +01:00
|
|
|
'RCTEventEmitter',
|
|
|
|
|
'TextInputState',
|
|
|
|
|
'UIManager',
|
|
|
|
|
'deepDiffer',
|
|
|
|
|
'deepFreezeAndThrowOnMutationInDev',
|
|
|
|
|
'flattenStyle',
|
2018-04-09 20:05:57 -07:00
|
|
|
'ReactNativeViewConfigRegistry',
|
2017-04-05 16:47:29 +01:00
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
|
2018-01-22 09:58:35 -08:00
|
|
|
/******* React Native Fabric *******/
|
2018-04-18 13:16:50 -07:00
|
|
|
{
|
|
|
|
|
label: 'native-fabric-fb',
|
|
|
|
|
bundleTypes: [RN_FB_DEV, RN_FB_PROD],
|
|
|
|
|
moduleType: RENDERER,
|
|
|
|
|
entry: 'react-native-renderer/fabric',
|
|
|
|
|
global: 'ReactFabric',
|
|
|
|
|
externals: [
|
|
|
|
|
'ExceptionsManager',
|
|
|
|
|
'InitializeCore',
|
|
|
|
|
'Platform',
|
|
|
|
|
'RCTEventEmitter',
|
|
|
|
|
'TextInputState',
|
|
|
|
|
'UIManager',
|
|
|
|
|
'FabricUIManager',
|
|
|
|
|
'deepDiffer',
|
|
|
|
|
'deepFreezeAndThrowOnMutationInDev',
|
|
|
|
|
'flattenStyle',
|
|
|
|
|
'ReactNativeViewConfigRegistry',
|
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
|
2018-01-22 09:58:35 -08:00
|
|
|
{
|
|
|
|
|
label: 'native-fabric',
|
2018-04-18 13:16:50 -07:00
|
|
|
bundleTypes: [RN_OSS_DEV, RN_OSS_PROD],
|
2018-01-22 09:58:35 -08:00
|
|
|
moduleType: RENDERER,
|
|
|
|
|
entry: 'react-native-renderer/fabric',
|
|
|
|
|
global: 'ReactFabric',
|
|
|
|
|
externals: [
|
|
|
|
|
'ExceptionsManager',
|
|
|
|
|
'InitializeCore',
|
|
|
|
|
'Platform',
|
|
|
|
|
'RCTEventEmitter',
|
|
|
|
|
'TextInputState',
|
|
|
|
|
'UIManager',
|
|
|
|
|
'FabricUIManager',
|
|
|
|
|
'deepDiffer',
|
|
|
|
|
'deepFreezeAndThrowOnMutationInDev',
|
|
|
|
|
'flattenStyle',
|
2018-04-09 20:05:57 -07:00
|
|
|
'ReactNativeViewConfigRegistry',
|
2018-01-22 09:58:35 -08:00
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
|
2017-04-05 16:47:29 +01:00
|
|
|
/******* React Test Renderer *******/
|
|
|
|
|
{
|
2017-10-25 02:55:00 +03:00
|
|
|
label: 'test',
|
2018-04-18 13:16:50 -07:00
|
|
|
bundleTypes: [FB_WWW_DEV, NODE_DEV, NODE_PROD, UMD_DEV, UMD_PROD],
|
2017-10-11 14:29:26 -04:00
|
|
|
moduleType: RENDERER,
|
2017-10-25 02:55:00 +03:00
|
|
|
entry: 'react-test-renderer',
|
|
|
|
|
global: 'ReactTestRenderer',
|
|
|
|
|
externals: ['react'],
|
2017-04-05 16:47:29 +01:00
|
|
|
},
|
2017-10-25 02:55:00 +03:00
|
|
|
|
2017-04-19 16:45:31 -07:00
|
|
|
{
|
2017-10-25 02:55:00 +03:00
|
|
|
label: 'test-shallow',
|
2018-04-18 13:16:50 -07:00
|
|
|
bundleTypes: [FB_WWW_DEV, NODE_DEV, NODE_PROD, UMD_DEV, UMD_PROD],
|
2018-05-19 11:29:11 +01:00
|
|
|
moduleType: NON_FIBER_RENDERER,
|
2017-10-25 02:55:00 +03:00
|
|
|
entry: 'react-test-renderer/shallow',
|
|
|
|
|
global: 'ReactShallowRenderer',
|
|
|
|
|
externals: ['react'],
|
2017-04-19 16:45:31 -07:00
|
|
|
},
|
2017-04-05 16:47:29 +01:00
|
|
|
|
2017-11-23 17:44:58 +00:00
|
|
|
/******* React Noop Renderer (used for tests) *******/
|
2017-04-05 16:47:29 +01:00
|
|
|
{
|
2017-10-25 02:55:00 +03:00
|
|
|
label: 'noop',
|
2017-11-23 17:44:58 +00:00
|
|
|
bundleTypes: [NODE_DEV, NODE_PROD],
|
2017-10-11 14:29:26 -04:00
|
|
|
moduleType: RENDERER,
|
2017-10-25 02:55:00 +03:00
|
|
|
entry: 'react-noop-renderer',
|
|
|
|
|
global: 'ReactNoopRenderer',
|
2017-10-26 15:15:24 +01:00
|
|
|
externals: ['react', 'expect'],
|
2017-11-23 17:44:58 +00:00
|
|
|
// React Noop uses generators. However GCC currently
|
|
|
|
|
// breaks when we attempt to use them in the output.
|
2018-05-14 13:57:33 +01:00
|
|
|
// So we precompile them with regenerator, and include
|
|
|
|
|
// it as a runtime dependency of React Noop. In practice
|
|
|
|
|
// this isn't an issue because React Noop is only used
|
|
|
|
|
// in our tests. We wouldn't want to do this for any
|
|
|
|
|
// public package though.
|
|
|
|
|
babel: opts =>
|
|
|
|
|
Object.assign({}, opts, {
|
|
|
|
|
plugins: opts.plugins.concat([
|
|
|
|
|
require.resolve('babel-plugin-transform-regenerator'),
|
|
|
|
|
]),
|
|
|
|
|
}),
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
/******* React Noop Persistent Renderer (used for tests) *******/
|
|
|
|
|
{
|
|
|
|
|
label: 'noop-persistent',
|
|
|
|
|
bundleTypes: [NODE_DEV, NODE_PROD],
|
|
|
|
|
moduleType: RENDERER,
|
|
|
|
|
entry: 'react-noop-renderer/persistent',
|
|
|
|
|
global: 'ReactNoopRendererPersistent',
|
|
|
|
|
externals: ['react', 'expect'],
|
|
|
|
|
// React Noop uses generators. However GCC currently
|
|
|
|
|
// breaks when we attempt to use them in the output.
|
2017-11-23 17:44:58 +00:00
|
|
|
// So we precompile them with regenerator, and include
|
|
|
|
|
// it as a runtime dependency of React Noop. In practice
|
|
|
|
|
// this isn't an issue because React Noop is only used
|
|
|
|
|
// in our tests. We wouldn't want to do this for any
|
|
|
|
|
// public package though.
|
|
|
|
|
babel: opts =>
|
|
|
|
|
Object.assign({}, opts, {
|
|
|
|
|
plugins: opts.plugins.concat([
|
|
|
|
|
require.resolve('babel-plugin-transform-regenerator'),
|
|
|
|
|
]),
|
|
|
|
|
}),
|
2017-04-05 16:47:29 +01:00
|
|
|
},
|
2017-10-11 14:29:26 -04:00
|
|
|
|
|
|
|
|
/******* React Reconciler *******/
|
|
|
|
|
{
|
2017-10-25 02:55:00 +03:00
|
|
|
label: 'react-reconciler',
|
2017-10-11 14:29:26 -04:00
|
|
|
bundleTypes: [NODE_DEV, NODE_PROD],
|
|
|
|
|
moduleType: RECONCILER,
|
2017-10-25 02:55:00 +03:00
|
|
|
entry: 'react-reconciler',
|
|
|
|
|
global: 'ReactReconciler',
|
|
|
|
|
externals: ['react'],
|
2018-02-05 16:56:21 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
|
|
/******* React Persistent Reconciler *******/
|
|
|
|
|
{
|
|
|
|
|
label: 'react-reconciler-persistent',
|
|
|
|
|
bundleTypes: [NODE_DEV, NODE_PROD],
|
|
|
|
|
moduleType: RECONCILER,
|
|
|
|
|
entry: 'react-reconciler/persistent',
|
|
|
|
|
global: 'ReactPersistentReconciler',
|
|
|
|
|
externals: ['react'],
|
2017-10-11 14:29:26 -04:00
|
|
|
},
|
2017-10-25 22:23:55 +03:00
|
|
|
|
2017-11-29 00:57:22 +08:00
|
|
|
/******* Reflection *******/
|
|
|
|
|
{
|
|
|
|
|
label: 'reconciler-reflection',
|
|
|
|
|
moduleType: RENDERER_UTILS,
|
|
|
|
|
bundleTypes: [NODE_DEV, NODE_PROD],
|
|
|
|
|
entry: 'react-reconciler/reflection',
|
|
|
|
|
global: 'ReactFiberTreeReflection',
|
|
|
|
|
externals: [],
|
|
|
|
|
},
|
|
|
|
|
|
2018-02-11 14:08:40 -08:00
|
|
|
/******* React Is *******/
|
|
|
|
|
{
|
|
|
|
|
label: 'react-is',
|
2018-04-18 13:16:50 -07:00
|
|
|
bundleTypes: [
|
|
|
|
|
NODE_DEV,
|
|
|
|
|
NODE_PROD,
|
|
|
|
|
FB_WWW_DEV,
|
|
|
|
|
FB_WWW_PROD,
|
|
|
|
|
UMD_DEV,
|
|
|
|
|
UMD_PROD,
|
|
|
|
|
],
|
2018-02-11 14:08:40 -08:00
|
|
|
moduleType: ISOMORPHIC,
|
|
|
|
|
entry: 'react-is',
|
|
|
|
|
global: 'ReactIs',
|
|
|
|
|
externals: [],
|
|
|
|
|
},
|
2018-02-15 16:38:15 -08:00
|
|
|
|
|
|
|
|
/******* Simple Cache Provider (experimental) *******/
|
|
|
|
|
{
|
|
|
|
|
label: 'simple-cache-provider',
|
2018-05-15 13:21:07 -07:00
|
|
|
bundleTypes: [FB_WWW_DEV, FB_WWW_PROD, NODE_DEV, NODE_PROD],
|
2018-02-15 16:38:15 -08:00
|
|
|
moduleType: ISOMORPHIC,
|
|
|
|
|
entry: 'simple-cache-provider',
|
|
|
|
|
global: 'SimpleCacheProvider',
|
|
|
|
|
externals: ['react'],
|
|
|
|
|
},
|
2018-03-13 13:59:09 -07:00
|
|
|
|
|
|
|
|
/******* createComponentWithSubscriptions (experimental) *******/
|
|
|
|
|
{
|
|
|
|
|
label: 'create-subscription',
|
|
|
|
|
bundleTypes: [NODE_DEV, NODE_PROD],
|
|
|
|
|
moduleType: ISOMORPHIC,
|
|
|
|
|
entry: 'create-subscription',
|
|
|
|
|
global: 'createSubscription',
|
|
|
|
|
externals: ['react'],
|
|
|
|
|
},
|
2018-04-19 09:29:08 -07:00
|
|
|
|
|
|
|
|
/******* React Scheduler (experimental) *******/
|
|
|
|
|
{
|
|
|
|
|
label: 'react-scheduler',
|
2018-05-29 13:30:04 -07:00
|
|
|
bundleTypes: [
|
|
|
|
|
UMD_DEV,
|
|
|
|
|
UMD_PROD,
|
|
|
|
|
NODE_DEV,
|
|
|
|
|
NODE_PROD,
|
|
|
|
|
FB_WWW_DEV,
|
|
|
|
|
FB_WWW_PROD,
|
|
|
|
|
],
|
2018-04-19 09:29:08 -07:00
|
|
|
moduleType: ISOMORPHIC,
|
|
|
|
|
entry: 'react-scheduler',
|
|
|
|
|
global: 'ReactScheduler',
|
|
|
|
|
externals: [],
|
|
|
|
|
},
|
2017-04-05 16:47:29 +01:00
|
|
|
];
|
|
|
|
|
|
2017-09-14 01:24:31 +01:00
|
|
|
// Based on deep-freeze by substack (public domain)
|
|
|
|
|
function deepFreeze(o) {
|
|
|
|
|
Object.freeze(o);
|
|
|
|
|
Object.getOwnPropertyNames(o).forEach(function(prop) {
|
|
|
|
|
if (
|
|
|
|
|
o[prop] !== null &&
|
|
|
|
|
(typeof o[prop] === 'object' || typeof o[prop] === 'function') &&
|
|
|
|
|
!Object.isFrozen(o[prop])
|
|
|
|
|
) {
|
|
|
|
|
deepFreeze(o[prop]);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
return o;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Don't accidentally mutate config as part of the build
|
|
|
|
|
deepFreeze(bundles);
|
|
|
|
|
|
2017-04-05 16:47:29 +01:00
|
|
|
module.exports = {
|
|
|
|
|
bundleTypes,
|
2017-10-11 14:29:26 -04:00
|
|
|
moduleTypes,
|
2017-04-05 16:47:29 +01:00
|
|
|
bundles,
|
|
|
|
|
};
|