@samitouri / QOS-React / commits / 366c4bb5cb

Don't let UMD create extraneous global variables (#10935)

Dan Abramov committed Sep 29, 2017 at 12:48 UTC 366c4bb5cb7c89821116510e664580bce9484289
2 files changed +11 -9
scripts/rollup/build.js
+3 -1
@@ -350,7 +350,9 @@ function getPlugins(
350 languageOut: 'ECMASCRIPT5_STRICT',
351 env: 'CUSTOM',
352 warningLevel: 'QUIET',
353 - assumeFunctionWrapper: true,
353 + // Don't let it create global variables in the browser.
354 + // https://github.com/facebook/react/issues/10909
355 + assumeFunctionWrapper: bundleType !== UMD_PROD,
356 applyInputSourceMaps: false,
357 useTypesForOptimization: false,
358 processCommonJsModules: false,
scripts/rollup/results.json
+8 -8
@@ -5,8 +5,8 @@
5 "gzip": 16507
6 },
7 "react.production.min.js (UMD_PROD)": {
8 - "size": 6598,
9 - "gzip": 2753
8 + "size": 6634,
9 + "gzip": 2764
10 },
11 "react.development.js (NODE_DEV)": {
12 "size": 55305,
@@ -29,8 +29,8 @@
29 "gzip": 148516
30 },
31 "react-dom.production.min.js (UMD_PROD)": {
32 - "size": 102900,
33 - "gzip": 32047
32 + "size": 101633,
33 + "gzip": 32093
34 },
35 "react-dom.development.js (NODE_DEV)": {
36 "size": 606589,
@@ -61,8 +61,8 @@
61 "gzip": 22083
62 },
63 "react-dom-unstable-native-dependencies.production.min.js (UMD_PROD)": {
64 - "size": 15415,
65 - "gzip": 5073
64 + "size": 15432,
65 + "gzip": 5071
66 },
67 "react-dom-unstable-native-dependencies.development.js (NODE_DEV)": {
68 "size": 81143,
@@ -85,8 +85,8 @@
85 "gzip": 34451
86 },
87 "react-dom-server.browser.production.min.js (UMD_PROD)": {
88 - "size": 14959,
89 - "gzip": 5859
88 + "size": 14948,
89 + "gzip": 5844
90 },
91 "react-dom-server.browser.development.js (NODE_DEV)": {
92 "size": 104475,