Expose TapEventPlugin on the www bundle (#11360)
Dan Abramov committed
Oct 25, 2017 at 17:37 UTC
3ad5bd803f1b9447110290543add60267b1048a4
7 files changed
+11
-62
packages/react-dom/index.fb.js
+2
-4
@@ -18,10 +18,8 @@ Object.assign(ReactDOM.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED, {
18
ReactFiberTreeReflection: require('shared/ReactFiberTreeReflection'),
19
ReactDOMComponentTree: require('./src/client/ReactDOMComponentTree'),
20
ReactInstanceMap: require('shared/ReactInstanceMap'),
21
- // These are dependencies of TapEventPlugin:
22
- EventPluginUtils: require('events/EventPluginUtils'),
23
- EventPropagators: require('events/EventPropagators'),
24
- SyntheticUIEvent: require('./src/events/SyntheticUIEvent'),
21
+ // Used by www msite:
22
+ TapEventPlugin: require('./src/events/TapEventPlugin'),
23
});
24
25
module.exports = ReactDOM;
packages/shared/describeComponentFrame.js
-1
@@ -5,7 +5,6 @@
5
* LICENSE file in the root directory of this source tree.
6
*
7
* @flow
8
- * @providesModule describeComponentFrame
8
*/
9
10
'use strict';
scripts/rollup/packaging.js
+1
-15
@@ -17,10 +17,6 @@ const RN_DEV = Bundles.bundleTypes.RN_DEV;
17
const RN_PROD = Bundles.bundleTypes.RN_PROD;
18
19
const facebookWWW = 'facebook-www';
20
-// these files need to be copied to the facebook-www build
21
-const facebookWWWSrcDependencies = [
22
- 'packages/react-dom/src/events/TapEventPlugin.js',
23
-];
20
21
// these files need to be copied to the react-native build
22
const reactNativeSrcDependencies = [
@@ -114,17 +110,7 @@ function createFacebookWWWBuild() {
110
const from = join('scripts', 'rollup', 'shims', facebookWWW);
111
const to = join('build', facebookWWW, 'shims');
112
117
- return asyncCopyTo(from, to).then(() => {
118
- let promises = [];
119
- // we also need to copy over some specific files from src
120
- // defined in facebookWWWSrcDependencies
121
- for (const srcDependency of facebookWWWSrcDependencies) {
122
- promises.push(
123
- asyncCopyTo(resolve(srcDependency), join(to, basename(srcDependency)))
124
- );
125
- }
126
- return Promise.all(promises);
127
- });
113
+ return asyncCopyTo(from, to);
114
}
115
116
function copyBundleIntoNodePackage(packageName, filename, bundleType) {
scripts/rollup/results.json
+6
-6
@@ -41,12 +41,12 @@
41
"gzip": 33563
42
},
43
"ReactDOM-dev.js (FB_DEV)": {
44
- "size": 587573,
45
- "gzip": 134618
44
+ "size": 590443,
45
+ "gzip": 135554
46
},
47
"ReactDOM-prod.js (FB_PROD)": {
48
- "size": 418348,
49
- "gzip": 92934
48
+ "size": 420794,
49
+ "gzip": 93574
50
},
51
"react-dom-test-utils.development.js (NODE_DEV)": {
52
"size": 41554,
@@ -101,8 +101,8 @@
101
"gzip": 5899
102
},
103
"ReactDOMServer-dev.js (FB_DEV)": {
104
- "size": 93943,
105
- "gzip": 25012
104
+ "size": 93901,
105
+ "gzip": 25000
106
},
107
"ReactDOMServer-prod.js (FB_PROD)": {
108
"size": 42426,
scripts/rollup/shims/facebook-www/EventPropagators.js
deleted
-17
@@ -1,17 +0,0 @@
1
-/**
2
- * Copyright (c) 2013-present, Facebook, Inc.
3
- *
4
- * This source code is licensed under the MIT license found in the
5
- * LICENSE file in the root directory of this source tree.
6
- *
7
- * @providesModule EventPropagators
8
- */
9
-
10
-'use strict';
11
-
12
-const {
13
- __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,
14
-} = require('ReactDOM-fb');
15
-
16
-module.exports =
17
- __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.EventPropagators;
scripts/rollup/shims/facebook-www/SyntheticUIEvent.js
deleted
-17
@@ -1,17 +0,0 @@
1
-/**
2
- * Copyright (c) 2013-present, Facebook, Inc.
3
- *
4
- * This source code is licensed under the MIT license found in the
5
- * LICENSE file in the root directory of this source tree.
6
- *
7
- * @providesModule SyntheticUIEvent
8
- */
9
-
10
-'use strict';
11
-
12
-const {
13
- __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,
14
-} = require('ReactDOM-fb');
15
-
16
-module.exports =
17
- __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.SyntheticUIEvent;
scripts/rollup/shims/facebook-www/TapEventPlugin.js
renamed
+2
-2
@@ -4,7 +4,7 @@
4
* This source code is licensed under the MIT license found in the
5
* LICENSE file in the root directory of this source tree.
6
*
7
- * @providesModule EventPluginUtils
7
+ * @providesModule TapEventPlugin
8
*/
9
10
'use strict';
@@ -14,4 +14,4 @@ const {
14
} = require('ReactDOM-fb');
15
16
module.exports =
17
- __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.EventPluginUtils;
17
+ __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.TapEventPlugin;