Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[core] Import esm babel helpers #16701

Merged
merged 1 commit into from
Jul 26, 2019
Merged

Conversation

TrySound
Copy link
Contributor

In this diff I changed babel helpers imports to esm versions for
esm/es/umd bundles. For example

@babel/runtime/helpers/extends -> @babel/runtime/helpers/esm/extends

In this diff I changed babel helpers imports to esm versions for
esm/es/umd bundles. For example

```
@babel/runtime/helpers/extends -> @babel/runtime/helpers/esm/extends
```
@oliviertassinari oliviertassinari added the core Infrastructure work going on behind the scenes label Jul 23, 2019
@mui-pr-bot
Copy link

@material-ui/core: parsed: +0.72% , gzip: -0.01% 😍
@material-ui/styles: parsed: -0.46% 😍, gzip: -0.71% 😍

Details of bundle changes.

Comparing: 29a61df...9a48ae7

bundle parsed diff gzip diff prev parsed current parsed prev gzip current gzip
@material-ui/core +0.72% 🔺 -0.01% 325,982 328,340 89,947 89,937
@material-ui/core/Paper +0.67% 🔺 +0.32% 🔺 68,161 68,616 20,407 20,473
@material-ui/core/Paper.esm +0.10% 🔺 0.00% 61,960 62,023 19,210 19,210
@material-ui/core/Popper +0.77% 🔺 +0.02% 🔺 28,957 29,181 10,426 10,428
@material-ui/core/Textarea +3.94% 🔺 -0.13% 5,534 5,752 2,368 2,365
@material-ui/core/TrapFocus -0.05% +0.50% 🔺 3,808 3,806 1,600 1,608
@material-ui/core/styles/createMuiTheme +1.41% 🔺 +0.15% 🔺 16,155 16,383 5,812 5,821
@material-ui/core/useMediaQuery +3.87% 🔺 -0.30% 3,098 3,218 1,315 1,311
@material-ui/lab +0.02% 🔺 -0.19% 141,883 141,917 43,669 43,584
@material-ui/styles -0.46% -0.71% 51,577 51,339 15,404 15,294
@material-ui/system +1.13% 🔺 -1.44% 15,570 15,746 4,436 4,372
Button -0.35% -0.21% 79,771 79,492 24,357 24,305
Modal +2.19% 🔺 -0.25% 14,631 14,951 5,225 5,212
Portal +2.73% 🔺 +0.19% 🔺 3,484 3,579 1,565 1,568
Rating +0.25% 🔺 -0.08% 70,524 70,701 22,086 22,068
Slider -0.35% -0.24% 75,295 75,033 23,337 23,280
colorManipulator 0.00% 0.00% 3,904 3,904 1,543 1,543
docs.landing 0.00% +0.01% 🔺 51,259 51,259 13,537 13,538
docs.main 0.00% 0.00% 580,627 580,627 190,465 190,465
packages/material-ui/build/umd/material-ui.production.min.js -0.53% -0.60% 300,392 298,787 86,325 85,803
docs: / 0.00% 0.00% 55,200 55,200 -1 -1
docs: /_app 0.00% 0.00% 136,000 136,000 -1 -1
docs: /_error 0.00% 0.00% 2,110 2,110 -1 -1
docs: /blog/2019-developer-survey-results 0.00% 0.00% 13,600 13,600 -1 -1
docs: /blog/april-2019-update 0.00% 0.00% 4,620 4,620 -1 -1
docs: /blog/june-2019-update 0.00% 0.00% 2,200 2,200 -1 -1
docs: /blog/march-2019-update 0.00% 0.00% 3,180 3,180 -1 -1
docs: /blog/material-ui-v4-is-out 0.00% 0.00% 22,500 22,500 -1 -1
docs: /blog/may-2019-update 0.00% 0.00% 2,750 2,750 -1 -1
docs: /components/about-the-lab 0.00% 0.00% 6,370 6,370 -1 -1
docs: /components/app-bar 0.00% 0.00% 132,000 132,000 -1 -1
docs: /components/autocomplete 0.00% 0.00% 304,000 304,000 -1 -1
docs: /components/avatars 0.00% 0.00% 26,600 26,600 -1 -1
docs: /components/badges 0.00% 0.00% 60,000 60,000 -1 -1
docs: /components/bottom-navigation 0.00% 0.00% 26,900 26,900 -1 -1
docs: /components/box 0.00% 0.00% 32,800 32,800 -1 -1
docs: /components/breadcrumbs 0.00% 0.00% 98,800 98,800 -1 -1
docs: /components/buttons 0.00% 0.00% 233,000 233,000 -1 -1
docs: /components/cards 0.00% 0.00% 72,400 72,400 -1 -1
docs: /components/checkboxes 0.00% 0.00% 65,000 65,000 -1 -1
docs: /components/chips 0.00% 0.00% 114,000 114,000 -1 -1
docs: /components/click-away-listener 0.00% 0.00% 13,300 13,300 -1 -1
docs: /components/container 0.00% 0.00% 13,300 13,300 -1 -1
docs: /components/css-baseline 0.00% 0.00% 20,100 20,100 -1 -1
docs: /components/dialogs 0.00% 0.00% 220,000 220,000 -1 -1
docs: /components/dividers 0.00% 0.00% 50,500 50,500 -1 -1
docs: /components/drawers 0.00% 0.00% 225,000 225,000 -1 -1
docs: /components/expansion-panels 0.00% 0.00% 83,700 83,700 -1 -1
docs: /components/grid 0.00% 0.00% 152,000 152,000 -1 -1
docs: /components/grid-list 0.00% 0.00% 56,800 56,800 -1 -1
docs: /components/hidden 0.00% 0.00% 54,700 54,700 -1 -1
docs: /components/icons 0.00% 0.00% 145,000 145,000 -1 -1
docs: /components/links 0.00% 0.00% 51,900 51,900 -1 -1
docs: /components/lists 0.00% 0.00% 155,000 155,000 -1 -1
docs: /components/menus 0.00% 0.00% 88,500 88,500 -1 -1
docs: /components/modal 0.00% 0.00% 37,300 37,300 -1 -1
docs: /components/no-ssr 0.00% 0.00% 15,800 15,800 -1 -1
docs: /components/paper 0.00% 0.00% 9,510 9,510 -1 -1
docs: /components/pickers 0.00% 0.00% 187,000 187,000 -1 -1
docs: /components/popover 0.00% 0.00% 67,700 67,700 -1 -1
docs: /components/popper 0.00% 0.00% 113,000 113,000 -1 -1
docs: /components/portal 0.00% 0.00% 12,100 12,100 -1 -1
docs: /components/progress 0.00% 0.00% 102,000 102,000 -1 -1
docs: /components/radio-buttons 0.00% 0.00% 57,800 57,800 -1 -1
docs: /components/rating 0.00% 0.00% 49,800 49,800 -1 -1
docs: /components/selects 0.00% 0.00% 163,000 163,000 -1 -1
docs: /components/slider 0.00% 0.00% 78,900 78,900 -1 -1
docs: /components/snackbars 0.00% 0.00% 117,000 117,000 -1 -1
docs: /components/speed-dial 0.00% 0.00% 53,500 53,500 -1 -1
docs: /components/steppers 0.00% 0.00% 207,000 207,000 -1 -1
docs: /components/switches 0.00% 0.00% 72,800 72,800 -1 -1
docs: /components/tables 0.00% 0.00% 730,000 730,000 -1 -1
docs: /components/tabs 0.00% 0.00% 156,000 156,000 -1 -1
docs: /components/text-fields 0.00% 0.00% 298,000 298,000 -1 -1
docs: /components/textarea-autosize 0.00% 0.00% 9,750 9,750 -1 -1
docs: /components/toggle-button 0.00% 0.00% 21,800 21,800 -1 -1
docs: /components/tooltips 0.00% 0.00% 94,500 94,500 -1 -1
docs: /components/transfer-list 0.00% 0.00% 47,800 47,800 -1 -1
docs: /components/transitions 0.00% 0.00% 58,000 58,000 -1 -1
docs: /components/typography 0.00% 0.00% 38,800 38,800 -1 -1
docs: /components/use-media-query 0.00% 0.00% 60,600 60,600 -1 -1
docs: /customization/breakpoints 0.00% 0.00% 80,500 80,500 -1 -1
docs: /customization/color 0.00% 0.00% 97,700 97,700 -1 -1
docs: /customization/components 0.00% 0.00% 164,000 164,000 -1 -1
docs: /customization/default-theme 0.00% 0.00% 75,700 75,700 -1 -1
docs: /customization/density 0.00% 0.00% 39,300 39,300 -1 -1
docs: /customization/globals 0.00% 0.00% 19,800 19,800 -1 -1
docs: /customization/palette 0.00% 0.00% 57,500 57,500 -1 -1
docs: /customization/spacing 0.00% 0.00% 12,600 12,600 -1 -1
docs: /customization/themes 0.00% 0.00% 61,400 61,400 -1 -1
docs: /customization/typography 0.00% 0.00% 431,000 431,000 -1 -1
docs: /customization/z-index 0.00% 0.00% 9,730 9,730 -1 -1
docs: /discover-more/backers 0.00% 0.00% 6,780 6,780 -1 -1
docs: /discover-more/changelog 0.00% 0.00% 3,560 3,560 -1 -1
docs: /discover-more/community 0.00% 0.00% 5,440 5,440 -1 -1
docs: /discover-more/governance 0.00% 0.00% 6,800 6,800 -1 -1
docs: /discover-more/languages 0.00% 0.00% 10,100 10,100 -1 -1
docs: /discover-more/related-projects 0.00% 0.00% 18,800 18,800 -1 -1
docs: /discover-more/roadmap 0.00% 0.00% 6,610 6,610 -1 -1
docs: /discover-more/showcase 0.00% 0.00% 70,300 70,300 -1 -1
docs: /discover-more/team 0.00% 0.00% 21,800 21,800 -1 -1
docs: /discover-more/vision 0.00% 0.00% 19,100 19,100 -1 -1
docs: /getting-started/example-projects 0.00% 0.00% 24,000 24,000 -1 -1
docs: /getting-started/faq 0.00% 0.00% 154,000 154,000 -1 -1
docs: /getting-started/installation 0.00% 0.00% 31,600 31,600 -1 -1
docs: /getting-started/learn 0.00% 0.00% 37,300 37,300 -1 -1
docs: /getting-started/page-layout-examples 0.00% 0.00% 28,800 28,800 -1 -1
docs: /getting-started/page-layout-examples/album 0.00% 0.00% 9,850 9,850 -1 -1
docs: /getting-started/page-layout-examples/blog 0.00% 0.00% 31,900 31,900 -1 -1
docs: /getting-started/page-layout-examples/checkout 0.00% 0.00% 46,300 46,300 -1 -1
docs: /getting-started/page-layout-examples/dashboard 0.00% 0.00% 393,000 393,000 -1 -1
docs: /getting-started/page-layout-examples/pricing 0.00% 0.00% 20,300 20,300 -1 -1
docs: /getting-started/page-layout-examples/sign-in 0.00% 0.00% 43,000 43,000 -1 -1
docs: /getting-started/page-layout-examples/sign-in-side 0.00% 0.00% 43,200 43,200 -1 -1
docs: /getting-started/page-layout-examples/sign-up 0.00% 0.00% 43,400 43,400 -1 -1
docs: /getting-started/page-layout-examples/sticky-footer 0.00% 0.00% 2,090 2,090 -1 -1
docs: /getting-started/supported-components 0.00% 0.00% 73,800 73,800 -1 -1
docs: /getting-started/supported-platforms 0.00% 0.00% 23,800 23,800 -1 -1
docs: /getting-started/usage 0.00% 0.00% 32,200 32,200 -1 -1
docs: /guides/api 0.00% 0.00% 62,100 62,100 -1 -1
docs: /guides/composition 0.00% 0.00% 106,000 106,000 -1 -1
docs: /guides/flow 0.00% 0.00% 6,690 6,690 -1 -1
docs: /guides/interoperability 0.00% 0.00% 185,000 185,000 -1 -1
docs: /guides/migration-v0x 0.00% 0.00% 52,300 52,300 -1 -1
docs: /guides/migration-v3 0.00% 0.00% 131,000 131,000 -1 -1
docs: /guides/minimizing-bundle-size 0.00% 0.00% 45,500 45,500 -1 -1
docs: /guides/responsive-ui 0.00% 0.00% 14,400 14,400 -1 -1
docs: /guides/right-to-left 0.00% 0.00% 46,100 46,100 -1 -1
docs: /guides/server-rendering 0.00% 0.00% 58,500 58,500 -1 -1
docs: /guides/testing 0.00% 0.00% 53,900 53,900 -1 -1
docs: /guides/typescript 0.00% 0.00% 80,100 80,100 -1 -1
docs: /performance/table-component 0.00% 0.00% 1,340 1,340 -1 -1
docs: /performance/table-emotion 0.00% 0.00% 25,200 25,200 -1 -1
docs: /performance/table-hook 0.00% 0.00% 1,420 1,420 -1 -1
docs: /performance/table-mui 0.00% 0.00% 6,280 6,280 -1 -1
docs: /performance/table-raw 0.00% 0.00% 1,110 1,110 -1 -1
docs: /performance/table-styled-components 0.00% 0.00% 43,200 43,200 -1 -1
docs: /premium-themes/instapaper 0.00% 0.00% 87,800 87,800 -1 -1
docs: /premium-themes/onepirate 0.00% 0.00% 50,400 50,400 -1 -1
docs: /premium-themes/onepirate/forgot-password 0.00% 0.00% 75,800 75,800 -1 -1
docs: /premium-themes/onepirate/privacy 0.00% 0.00% 69,300 69,300 -1 -1
docs: /premium-themes/onepirate/sign-in 0.00% 0.00% 76,200 76,200 -1 -1
docs: /premium-themes/onepirate/sign-up 0.00% 0.00% 76,400 76,400 -1 -1
docs: /premium-themes/onepirate/terms 0.00% 0.00% 92,100 92,100 -1 -1
docs: /premium-themes/paperbase 0.00% 0.00% 53,300 53,300 -1 -1
docs: /premium-themes/tweeper 0.00% 0.00% 95,200 95,200 -1 -1
docs: /styles/advanced 0.00% 0.00% 235,000 235,000 -1 -1
docs: /styles/api 0.00% 0.00% 126,000 126,000 -1 -1
docs: /styles/basics 0.00% 0.00% 89,300 89,300 -1 -1
docs: /system/api 0.00% 0.00% 77,700 77,700 -1 -1
docs: /system/basics 0.00% 0.00% 187,000 187,000 -1 -1
docs: /system/borders 0.00% 0.00% 37,800 37,800 -1 -1
docs: /system/display 0.00% 0.00% 58,000 58,000 -1 -1
docs: /system/flexbox 0.00% 0.00% 68,400 68,400 -1 -1
docs: /system/palette 0.00% 0.00% 27,600 27,600 -1 -1
docs: /system/positions 0.00% 0.00% 22,000 22,000 -1 -1
docs: /system/shadows 0.00% 0.00% 21,100 21,100 -1 -1
docs: /system/sizing 0.00% 0.00% 29,900 29,900 -1 -1
docs: /system/spacing 0.00% 0.00% 49,700 49,700 -1 -1
docs: /system/typography 0.00% 0.00% 45,100 45,100 -1 -1
docs: /versions 0.00% 0.00% 76,700 76,700 -1 -1

Generated by 🚫 dangerJS against 9a48ae7

@oliviertassinari
Copy link
Member

It seems to product the same result than last time. No?

@TrySound
Copy link
Contributor Author

I really don't understand what's wrong with size snapshot script. Is it possible result is cached by branch name? My manual testing shows this

58040 -> 56949 for minified bundle

Here's not minified diff
index d0531b7ce..63cc37f77 100644
--- a/main0.js
+++ b/main.js
@@ -81,68 +81,17 @@
 /******/
 /******/
 /******/ 	// Load entry module and return exports
-/******/ 	return __webpack_require__(__webpack_require__.s = 16);
+/******/ 	return __webpack_require__(__webpack_require__.s = 11);
 /******/ })
 /************************************************************************/
 /******/ ([
 /* 0 */
 /***/ (function(module, exports) {
 
-function _extends() {
-  module.exports = _extends = Object.assign || function (target) {
-    for (var i = 1; i < arguments.length; i++) {
-      var source = arguments[i];
-
-      for (var key in source) {
-        if (Object.prototype.hasOwnProperty.call(source, key)) {
-          target[key] = source[key];
-        }
-      }
-    }
-
-    return target;
-  };
-
-  return _extends.apply(this, arguments);
-}
-
-module.exports = _extends;
-
-/***/ }),
-/* 1 */
-/***/ (function(module, exports) {
-
 module.exports = react;
 
 /***/ }),
-/* 2 */
-/***/ (function(module, exports, __webpack_require__) {
-
-var objectWithoutPropertiesLoose = __webpack_require__(10);
-
-function _objectWithoutProperties(source, excluded) {
-  if (source == null) return {};
-  var target = objectWithoutPropertiesLoose(source, excluded);
-  var key, i;
-
-  if (Object.getOwnPropertySymbols) {
-    var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
-
-    for (i = 0; i < sourceSymbolKeys.length; i++) {
-      key = sourceSymbolKeys[i];
-      if (excluded.indexOf(key) >= 0) continue;
-      if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
-      target[key] = source[key];
-    }
-  }
-
-  return target;
-}
-
-module.exports = _objectWithoutProperties;
-
-/***/ }),
-/* 3 */
+/* 1 */
 /***/ (function(module, exports, __webpack_require__) {
 
 "use strict";
@@ -211,7 +160,7 @@ module.exports = warning;
 
 
 /***/ }),
-/* 4 */
+/* 2 */
 /***/ (function(module, exports, __webpack_require__) {
 
 "use strict";
@@ -329,28 +278,7 @@ module.exports = deepmerge_1;
 
 
 /***/ }),
-/* 5 */
-/***/ (function(module, exports) {
-
-function _defineProperty(obj, key, value) {
-  if (key in obj) {
-    Object.defineProperty(obj, key, {
-      value: value,
-      enumerable: true,
-      configurable: true,
-      writable: true
-    });
-  } else {
-    obj[key] = value;
-  }
-
-  return obj;
-}
-
-module.exports = _defineProperty;
-
-/***/ }),
-/* 6 */
+/* 3 */
 /***/ (function(module, exports, __webpack_require__) {
 
 /**
@@ -363,13 +291,13 @@ module.exports = _defineProperty;
 if (false) { var throwOnDirectAccess, ReactIs; } else {
   // By explicitly using `prop-types` you are opting into new production behavior.
   // http://fb.me/prop-types-in-prod
-  module.exports = __webpack_require__(11)();
+  module.exports = __webpack_require__(7)();
 }
 
 
 /***/ }),
-/* 7 */,
-/* 8 */
+/* 4 */,
+/* 5 */
 /***/ (function(module, exports, __webpack_require__) {
 
 "use strict";
@@ -379,7 +307,7 @@ if (false) { var throwOnDirectAccess, ReactIs; } else {
  * Copyright 2015, Yahoo! Inc.
  * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.
  */
-var ReactIs = __webpack_require__(13);
+var ReactIs = __webpack_require__(9);
 var REACT_STATICS = {
     childContextTypes: true,
     contextType: true,
@@ -479,29 +407,8 @@ module.exports = hoistNonReactStatics;
 
 
 /***/ }),
-/* 9 */,
-/* 10 */
-/***/ (function(module, exports) {
-
-function _objectWithoutPropertiesLoose(source, excluded) {
-  if (source == null) return {};
-  var target = {};
-  var sourceKeys = Object.keys(source);
-  var key, i;
-
-  for (i = 0; i < sourceKeys.length; i++) {
-    key = sourceKeys[i];
-    if (excluded.indexOf(key) >= 0) continue;
-    target[key] = source[key];
-  }
-
-  return target;
-}
-
-module.exports = _objectWithoutPropertiesLoose;
-
-/***/ }),
-/* 11 */
+/* 6 */,
+/* 7 */
 /***/ (function(module, exports, __webpack_require__) {
 
 "use strict";
@@ -514,7 +421,7 @@ module.exports = _objectWithoutPropertiesLoose;
 
 
 
-var ReactPropTypesSecret = __webpack_require__(12);
+var ReactPropTypesSecret = __webpack_require__(8);
 
 function emptyFunction() {}
 function emptyFunctionWithReset() {}
@@ -572,7 +479,7 @@ module.exports = function() {
 
 
 /***/ }),
-/* 12 */
+/* 8 */
 /***/ (function(module, exports, __webpack_require__) {
 
 "use strict";
@@ -591,19 +498,19 @@ module.exports = ReactPropTypesSecret;
 
 
 /***/ }),
-/* 13 */
+/* 9 */
 /***/ (function(module, exports, __webpack_require__) {
 
 "use strict";
 
 
 if (true) {
-  module.exports = __webpack_require__(14);
+  module.exports = __webpack_require__(10);
 } else {}
 
 
 /***/ }),
-/* 14 */
+/* 10 */
 /***/ (function(module, exports, __webpack_require__) {
 
 "use strict";
@@ -625,48 +532,71 @@ exports.isSuspense=function(a){return t(a)===p};
 
 
 /***/ }),
-/* 15 */
-/***/ (function(module, exports) {
+/* 11 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
-function _typeof2(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof2 = function _typeof2(obj) { return typeof obj; }; } else { _typeof2 = function _typeof2(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof2(obj); }
+"use strict";
+__webpack_require__.r(__webpack_exports__);
 
-function _typeof(obj) {
-  if (typeof Symbol === "function" && _typeof2(Symbol.iterator) === "symbol") {
-    module.exports = _typeof = function _typeof(obj) {
-      return _typeof2(obj);
-    };
-  } else {
-    module.exports = _typeof = function _typeof(obj) {
-      return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : _typeof2(obj);
-    };
+// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js
+function _objectWithoutPropertiesLoose(source, excluded) {
+  if (source == null) return {};
+  var target = {};
+  var sourceKeys = Object.keys(source);
+  var key, i;
+
+  for (i = 0; i < sourceKeys.length; i++) {
+    key = sourceKeys[i];
+    if (excluded.indexOf(key) >= 0) continue;
+    target[key] = source[key];
   }
 
-  return _typeof(obj);
+  return target;
 }
+// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js
 
-module.exports = _typeof;
+function _objectWithoutProperties(source, excluded) {
+  if (source == null) return {};
+  var target = _objectWithoutPropertiesLoose(source, excluded);
+  var key, i;
 
-/***/ }),
-/* 16 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
+  if (Object.getOwnPropertySymbols) {
+    var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
 
-"use strict";
-__webpack_require__.r(__webpack_exports__);
+    for (i = 0; i < sourceSymbolKeys.length; i++) {
+      key = sourceSymbolKeys[i];
+      if (excluded.indexOf(key) >= 0) continue;
+      if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
+      target[key] = source[key];
+    }
+  }
 
-// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/objectWithoutProperties.js
-var objectWithoutProperties = __webpack_require__(2);
-var objectWithoutProperties_default = /*#__PURE__*/__webpack_require__.n(objectWithoutProperties);
+  return target;
+}
+// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js
+function _extends() {
+  _extends = Object.assign || function (target) {
+    for (var i = 1; i < arguments.length; i++) {
+      var source = arguments[i];
+
+      for (var key in source) {
+        if (Object.prototype.hasOwnProperty.call(source, key)) {
+          target[key] = source[key];
+        }
+      }
+    }
 
-// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/extends.js
-var helpers_extends = __webpack_require__(0);
-var extends_default = /*#__PURE__*/__webpack_require__.n(helpers_extends);
+    return target;
+  };
 
+  return _extends.apply(this, arguments);
+}
 // EXTERNAL MODULE: external "react"
-var external_react_ = __webpack_require__(1);
+var external_react_ = __webpack_require__(0);
 var external_react_default = /*#__PURE__*/__webpack_require__.n(external_react_);
 
 // EXTERNAL MODULE: ./node_modules/prop-types/index.js
-var prop_types = __webpack_require__(6);
+var prop_types = __webpack_require__(3);
 
 // CONCATENATED MODULE: ./node_modules/clsx/dist/clsx.m.js
 function toVal(mix) {
@@ -708,30 +638,12 @@ function toVal(mix) {
 });
 
 // EXTERNAL MODULE: ./node_modules/warning/warning.js
-var warning = __webpack_require__(3);
+var warning = __webpack_require__(1);
 
 // EXTERNAL MODULE: ./node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js
-var hoist_non_react_statics_cjs = __webpack_require__(8);
+var hoist_non_react_statics_cjs = __webpack_require__(5);
 var hoist_non_react_statics_cjs_default = /*#__PURE__*/__webpack_require__.n(hoist_non_react_statics_cjs);
 
-// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js
-function _extends() {
-  _extends = Object.assign || function (target) {
-    for (var i = 1; i < arguments.length; i++) {
-      var source = arguments[i];
-
-      for (var key in source) {
-        if (Object.prototype.hasOwnProperty.call(source, key)) {
-          target[key] = source[key];
-        }
-      }
-    }
-
-    return target;
-  };
-
-  return _extends.apply(this, arguments);
-}
 // CONCATENATED MODULE: ./node_modules/is-in-browser/dist/module.js
 var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
 
@@ -791,21 +703,6 @@ function _assertThisInitialized(self) {
 
   return self;
 }
-// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js
-function _objectWithoutPropertiesLoose(source, excluded) {
-  if (source == null) return {};
-  var target = {};
-  var sourceKeys = Object.keys(source);
-  var key, i;
-
-  for (i = 0; i < sourceKeys.length; i++) {
-    key = sourceKeys[i];
-    if (excluded.indexOf(key) >= 0) continue;
-    target[key] = source[key];
-  }
-
-  return target;
-}
 // CONCATENATED MODULE: ./node_modules/jss/dist/jss.esm.js
 
 
@@ -3011,7 +2908,7 @@ function mergeClasses() {
     return baseClasses;
   }
 
-  var nextClasses = extends_default()({}, baseClasses);
+  var nextClasses = _extends({}, baseClasses);
 
   if (false) {}
 
@@ -4502,11 +4399,11 @@ function StylesProvider(props) {
       injectFirst = _props$injectFirst === void 0 ? false : _props$injectFirst,
       _props$disableGenerat = props.disableGeneration,
       disableGeneration = _props$disableGenerat === void 0 ? false : _props$disableGenerat,
-      localOptions = objectWithoutProperties_default()(props, ["children", "injectFirst", "disableGeneration"]);
+      localOptions = _objectWithoutProperties(props, ["children", "injectFirst", "disableGeneration"]);
 
   var outerOptions = external_react_default.a.useContext(StylesContext);
 
-  var context = extends_default()({}, outerOptions, {
+  var context = _extends({}, outerOptions, {
     disableGeneration: disableGeneration
   }, localOptions);
 
@@ -4554,11 +4451,24 @@ function increment() {
    false ? undefined : void 0;
   return indexCounter;
 }
-// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/typeof.js
-var helpers_typeof = __webpack_require__(15);
+// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/typeof.js
+function _typeof2(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof2 = function _typeof2(obj) { return typeof obj; }; } else { _typeof2 = function _typeof2(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof2(obj); }
 
+function typeof_typeof(obj) {
+  if (typeof Symbol === "function" && _typeof2(Symbol.iterator) === "symbol") {
+    typeof_typeof = function _typeof(obj) {
+      return _typeof2(obj);
+    };
+  } else {
+    typeof_typeof = function _typeof(obj) {
+      return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : _typeof2(obj);
+    };
+  }
+
+  return typeof_typeof(obj);
+}
 // EXTERNAL MODULE: ./node_modules/deepmerge/dist/cjs.js
-var cjs = __webpack_require__(4);
+var cjs = __webpack_require__(2);
 var cjs_default = /*#__PURE__*/__webpack_require__.n(cjs);
 
 // CONCATENATED MODULE: ./packages/material-ui-styles/build/esm/getStylesCreator/getStylesCreator.js
@@ -4593,7 +4503,7 @@ function getStylesCreator(stylesOrCreator) {
 
       var overrides = theme.overrides[name];
 
-      var stylesWithOverrides = extends_default()({}, styles);
+      var stylesWithOverrides = _extends({}, styles);
 
       Object.keys(overrides).forEach(function (key) {
          false ? undefined : void 0;
@@ -4693,7 +4603,7 @@ function attach(_ref2, props) {
     makeStyles_multiKeyStore.set(stylesOptions.sheetsManager, stylesCreator, theme, sheetManager);
   }
 
-  var options = extends_default()({}, stylesCreator.options, stylesOptions, {
+  var options = _extends({}, stylesCreator.options, stylesOptions, {
     theme: theme,
     flip: typeof stylesOptions.flip === 'boolean' ? stylesOptions.flip : theme.direction === 'rtl'
   });
@@ -4711,7 +4621,7 @@ function attach(_ref2, props) {
     var styles = stylesCreator.create(theme, name);
 
     if (!staticSheet) {
-      staticSheet = stylesOptions.jss.createStyleSheet(styles, extends_default()({
+      staticSheet = stylesOptions.jss.createStyleSheet(styles, _extends({
         link: false
       }, options));
       staticSheet.attach();
@@ -4730,7 +4640,7 @@ function attach(_ref2, props) {
   }
 
   if (sheetManager.dynamicStyles) {
-    var dynamicSheet = stylesOptions.jss.createStyleSheet(sheetManager.dynamicStyles, extends_default()({
+    var dynamicSheet = stylesOptions.jss.createStyleSheet(sheetManager.dynamicStyles, _extends({
       link: true
     }, options));
      false ? undefined : void 0;
@@ -4823,7 +4733,7 @@ function makeStyles(stylesOrCreator) {
       Component = options.Component,
       _options$defaultTheme = options.defaultTheme,
       defaultTheme = _options$defaultTheme === void 0 ? getStylesCreator_noopTheme : _options$defaultTheme,
-      stylesOptions2 = objectWithoutProperties_default()(options, ["name", "classNamePrefix", "Component", "defaultTheme"]);
+      stylesOptions2 = _objectWithoutProperties(options, ["name", "classNamePrefix", "Component", "defaultTheme"]);
 
   var stylesCreator = getStylesCreator_getStylesCreator(stylesOrCreator);
   var classNamePrefix = name || classNamePrefixOption || 'makeStyles';
@@ -4838,7 +4748,7 @@ function makeStyles(stylesOrCreator) {
     var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
     var theme = (listenToTheme ? useTheme() : null) || defaultTheme;
 
-    var stylesOptions = extends_default()({}, external_react_default.a.useContext(StylesContext), stylesOptions2);
+    var stylesOptions = _extends({}, external_react_default.a.useContext(StylesContext), stylesOptions2);
 
     var instance = external_react_default.a.useRef();
     var shouldUpdate = external_react_default.a.useRef();
@@ -4915,7 +4825,7 @@ var withStyles_withStyles = function withStyles(stylesOrCreator) {
         _options$withTheme = options.withTheme,
         withTheme = _options$withTheme === void 0 ? false : _options$withTheme,
         name = options.name,
-        stylesOptions = objectWithoutProperties_default()(options, ["defaultTheme", "withTheme", "name"]);
+        stylesOptions = _objectWithoutProperties(options, ["defaultTheme", "withTheme", "name"]);
 
     if (false) {}
 
@@ -4923,7 +4833,7 @@ var withStyles_withStyles = function withStyles(stylesOrCreator) {
 
     if (false) { var displayName; }
 
-    var useStyles = makeStyles_makeStyles(stylesOrCreator, extends_default()({
+    var useStyles = makeStyles_makeStyles(stylesOrCreator, _extends({
       defaultTheme: defaultTheme,
       Component: Component,
       name: name || Component.displayName,
@@ -4932,7 +4842,7 @@ var withStyles_withStyles = function withStyles(stylesOrCreator) {
     var WithStyles = external_react_default.a.forwardRef(function WithStyles(props, ref) {
       var classesProp = props.classes,
           innerRef = props.innerRef,
-          other = objectWithoutProperties_default()(props, ["classes", "innerRef"]);
+          other = _objectWithoutProperties(props, ["classes", "innerRef"]);
 
       var classes = useStyles(props);
       var theme;
@@ -4958,7 +4868,7 @@ var withStyles_withStyles = function withStyles(stylesOrCreator) {
         }
       }
 
-      return external_react_default.a.createElement(Component, extends_default()({
+      return external_react_default.a.createElement(Component, _extends({
         ref: innerRef || ref,
         classes: classes
       }, more));
@@ -4976,10 +4886,21 @@ var withStyles_withStyles = function withStyles(stylesOrCreator) {
 };
 
 /* harmony default export */ var esm_withStyles_withStyles = (withStyles_withStyles);
-// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/defineProperty.js
-var defineProperty = __webpack_require__(5);
-var defineProperty_default = /*#__PURE__*/__webpack_require__.n(defineProperty);
+// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js
+function _defineProperty(obj, key, value) {
+  if (key in obj) {
+    Object.defineProperty(obj, key, {
+      value: value,
+      enumerable: true,
+      configurable: true,
+      writable: true
+    });
+  } else {
+    obj[key] = value;
+  }
 
+  return obj;
+}
 // CONCATENATED MODULE: ./packages/material-ui/node_modules/isobject/index.js
 /*!
  * isobject <https://github.com/jonschlinkert/isobject>
@@ -5049,7 +4970,7 @@ function createBreakpoints(breakpoints) {
       unit = _breakpoints$unit === void 0 ? 'px' : _breakpoints$unit,
       _breakpoints$step = breakpoints.step,
       step = _breakpoints$step === void 0 ? 5 : _breakpoints$step,
-      other = objectWithoutProperties_default()(breakpoints, ["values", "unit", "step"]);
+      other = _objectWithoutProperties(breakpoints, ["values", "unit", "step"]);
 
   function up(key) {
     var value = typeof values[key] === 'number' ? values[key] : key;
@@ -5087,7 +5008,7 @@ function createBreakpoints(breakpoints) {
     return values[key];
   }
 
-  return extends_default()({
+  return _extends({
     keys: keys,
     values: values,
     up: up,
@@ -5104,7 +5025,7 @@ function createBreakpoints(breakpoints) {
 function createMixins(breakpoints, spacing, mixins) {
   var _toolbar;
 
-  return extends_default()({
+  return _extends({
     gutters: function gutters() {
       var styles = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
       // To deprecate in v4.1
@@ -5123,19 +5044,19 @@ function createMixins(breakpoints, spacing, mixins) {
       // `,
       //         ].join('\n'),
       //       );
-      return extends_default()({
+      return _extends({
         paddingLeft: spacing(2),
         paddingRight: spacing(2)
-      }, styles, defineProperty_default()({}, breakpoints.up('sm'), extends_default()({
+      }, styles, _defineProperty({}, breakpoints.up('sm'), _extends({
         paddingLeft: spacing(3),
         paddingRight: spacing(3)
       }, styles[breakpoints.up('sm')])));
     },
     toolbar: (_toolbar = {
       minHeight: 56
-    }, defineProperty_default()(_toolbar, "".concat(breakpoints.up('xs'), " and (orientation: landscape)"), {
+    }, _defineProperty(_toolbar, "".concat(breakpoints.up('xs'), " and (orientation: landscape)"), {
       minHeight: 48
-    }), defineProperty_default()(_toolbar, breakpoints.up('sm'), {
+    }), _defineProperty(_toolbar, breakpoints.up('sm'), {
       minHeight: 64
     }), _toolbar)
   }, mixins);
@@ -5608,7 +5529,7 @@ function createPalette(palette) {
       contrastThreshold = _palette$contrastThre === void 0 ? 3 : _palette$contrastThre,
       _palette$tonalOffset = palette.tonalOffset,
       tonalOffset = _palette$tonalOffset === void 0 ? 0.2 : _palette$tonalOffset,
-      other = objectWithoutProperties_default()(palette, ["primary", "secondary", "error", "type", "contrastThreshold", "tonalOffset"]); // Use the same logic as
+      other = _objectWithoutProperties(palette, ["primary", "secondary", "error", "type", "contrastThreshold", "tonalOffset"]); // Use the same logic as
   // Bootstrap: https://github.com/twbs/bootstrap/blob/1d6e3710dd447de1a200f29e8fa521f8a0908f70/scss/_functions.scss#L59
   // and material-components-web https://github.com/material-components/material-components-web/blob/ac46b8863c4dab9fc22c4c662dc6bd1b65dd652f/packages/mdc-theme/_functions.scss#L54
 
@@ -5626,7 +5547,7 @@ function createPalette(palette) {
     var mainShade = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 500;
     var lightShade = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 300;
     var darkShade = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 700;
-    color = extends_default()({}, color);
+    color = _extends({}, color);
 
     if (!color.main && color[mainShade]) {
       color.main = color[mainShade];
@@ -5649,7 +5570,7 @@ function createPalette(palette) {
     light: light
   };
    false ? undefined : void 0;
-  var paletteOutput = cjs_default()(extends_default()({
+  var paletteOutput = cjs_default()(_extends({
     // A collection of common colors.
     common: colors_common,
     // The palette type, can be light or dark.
@@ -5716,7 +5637,7 @@ function createTypography(palette, typography) {
       _ref$htmlFontSize = _ref.htmlFontSize,
       htmlFontSize = _ref$htmlFontSize === void 0 ? 16 : _ref$htmlFontSize,
       allVariants = _ref.allVariants,
-      other = objectWithoutProperties_default()(_ref, ["fontFamily", "fontSize", "fontWeightLight", "fontWeightRegular", "fontWeightMedium", "fontWeightBold", "htmlFontSize", "allVariants"]);
+      other = _objectWithoutProperties(_ref, ["fontFamily", "fontSize", "fontWeightLight", "fontWeightRegular", "fontWeightMedium", "fontWeightBold", "htmlFontSize", "allVariants"]);
 
    false ? undefined : void 0;
    false ? undefined : void 0;
@@ -5727,7 +5648,7 @@ function createTypography(palette, typography) {
   };
 
   var buildVariant = function buildVariant(fontWeight, size, lineHeight, letterSpacing, casing) {
-    return extends_default()({
+    return _extends({
       fontFamily: fontFamily,
       fontWeight: fontWeight,
       fontSize: pxToRem(size),
@@ -5753,7 +5674,7 @@ function createTypography(palette, typography) {
     caption: buildVariant(fontWeightRegular, 12, 1.66, 0.4),
     overline: buildVariant(fontWeightRegular, 12, 2.66, 1, caseAllCaps)
   };
-  return cjs_default()(extends_default()({
+  return cjs_default()(_extends({
     htmlFontSize: htmlFontSize,
     pxToRem: pxToRem,
     round: round,
@@ -5906,7 +5827,7 @@ var isNumber = function isNumber(value) {
         easingOption = _options$easing === void 0 ? easing.easeInOut : _options$easing,
         _options$delay = options.delay,
         delay = _options$delay === void 0 ? 0 : _options$delay,
-        other = objectWithoutProperties_default()(options, ["duration", "easing", "delay"]);
+        other = _objectWithoutProperties(options, ["duration", "easing", "delay"]);
 
      false ? undefined : void 0;
      false ? undefined : void 0;
@@ -5970,13 +5891,13 @@ function createMuiTheme() {
       spacingInput = options.spacing,
       _options$typography = options.typography,
       typographyInput = _options$typography === void 0 ? {} : _options$typography,
-      other = objectWithoutProperties_default()(options, ["breakpoints", "mixins", "palette", "shadows", "spacing", "typography"]);
+      other = _objectWithoutProperties(options, ["breakpoints", "mixins", "palette", "shadows", "spacing", "typography"]);
 
   var palette = createPalette(paletteInput);
   var breakpoints = createBreakpoints(breakpointsInput);
   var spacing = createSpacing(spacingInput);
 
-  var muiTheme = extends_default()({
+  var muiTheme = _extends({
     breakpoints: breakpoints,
     direction: 'ltr',
     mixins: createMixins(breakpoints, spacing, mixinsInput),
@@ -6013,7 +5934,7 @@ var defaultTheme_defaultTheme = styles_createMuiTheme();
 
 
 function styles_withStyles_withStyles(stylesOrCreator, options) {
-  return esm_withStyles_withStyles(stylesOrCreator, extends_default()({
+  return esm_withStyles_withStyles(stylesOrCreator, _extends({
     defaultTheme: styles_defaultTheme
   }, options));
 }
@@ -6034,7 +5955,7 @@ var Paper_styles = function styles(theme) {
       boxShadow: shadow
     };
   });
-  return extends_default()({
+  return _extends({
     /* Styles applied to the root element. */
     root: {
       backgroundColor: theme.palette.background.paper,
@@ -6057,11 +5978,11 @@ var Paper_Paper = external_react_default.a.forwardRef(function Paper(props, ref)
       square = _props$square === void 0 ? false : _props$square,
       _props$elevation = props.elevation,
       elevation = _props$elevation === void 0 ? 1 : _props$elevation,
-      other = objectWithoutProperties_default()(props, ["classes", "className", "component", "square", "elevation"]);
+      other = _objectWithoutProperties(props, ["classes", "className", "component", "square", "elevation"]);
 
    false ? undefined : void 0;
   var className = clsx_m(classes.root, classes["elevation".concat(elevation)], classNameProp, !square && classes.rounded);
-  return external_react_default.a.createElement(Component, extends_default()({
+  return external_react_default.a.createElement(Component, _extends({
     className: className,
     ref: ref
   }, other));

@eps1lon
Copy link
Member

eps1lon commented Jul 23, 2019

Webpack seems to not like the change. Umd bundle is strictly smaller.

@TrySound
Copy link
Contributor Author

TrySound commented Jul 23, 2019

This is config I used to test size

const path = require('path');
const workspaceRoot = process.cwd()

module.exports = {
  entry: './packages/material-ui/build/esm/Paper',
  // ideally this would be computed from the bundles peer dependencies
  externals: /^(react|react-dom)$/,
  mode: 'production',
  resolve: {
    alias: {
      '@material-ui/core': path.join(workspaceRoot, 'packages/material-ui/build'),
      '@material-ui/lab': path.join(workspaceRoot, 'packages/material-ui-lab/build'),
      '@material-ui/styles': path.join(workspaceRoot, 'packages/material-ui-styles/build'),
      '@material-ui/system': path.join(workspaceRoot, 'packages/material-ui-system/build'),
      '@material-ui/utils': path.join(workspaceRoot, 'packages/material-ui-utils/build'),
    },
  },
};

@eps1lon
Copy link
Member

eps1lon commented Jul 23, 2019

Not sure what happened there for you. Did you run every step before creating the snapshot?

merge-base shows

"@material-ui/core/Paper.esm": {
    "parsed": 61960,
    "gzip": 19210
  },

-- https://eps1lon-material-ui.s3.amazonaws.com/artifacts/master/29a61df98ee6a233fc7f478eda21510848a1f9db/size-snapshot.json

Seems right. Will check out locally.

Aside: TODO: save the size snapshot in azure artifacts

@TrySound
Copy link
Contributor Author

I ran yarn build for all packages before running webpack

@eps1lon
Copy link
Member

eps1lon commented Jul 23, 2019

You didn't use yarn size:snapshot, right? If you have a single entry the chunks will be different. Including the commonJS build of Paper is likely the issue.

Should probably overhaul this and remove the entries from nextjs (they should already be compiled so no need to use it as an entry) and either put the commonJS build of Paper in a different config or just remove it.

@eps1lon
Copy link
Member

eps1lon commented Jul 23, 2019

Yeah can reproduce your result with a single entry but not with multiple entries. Our azure pipeline has the stats.json output from webpack. You could put that in a bundle analyser and check what's causing this.

@TrySound
Copy link
Contributor Author

Or maybe put each entry into own config? This will give true size.

@eps1lon
Copy link
Member

eps1lon commented Jul 23, 2019

Or maybe put each entry into own config? This will give true size.

It will give the isolated size which will unlikely ever be observable in actual bundles. We're trading isolation for more integrated and faster tests.

@oliviertassinari oliviertassinari added the PR: needs revision The pull request can't be merged. More details is available on the code review or fails in the CI label Jul 25, 2019
@TrySound
Copy link
Contributor Author

Did I prove this worth merging?

@oliviertassinari
Copy link
Member

I find this change interesting:

packages/material-ui/build/umd/material-ui.production.min.js | -0.53% | -0.60% | 300,392 | 298,787 | 86,325 | 85,803
-- | -- | -- | -- | -- | -- | --

The usage of the option seems to match: https://babeljs.io/docs/en/babel-plugin-transform-runtime#useesmodules.

From my part, I have no objection. @eps1lon?

@eps1lon
Copy link
Member

eps1lon commented Jul 26, 2019

From my part, I have no objection. @eps1lon?

Yeah. I'd say even if this produces some duplication the burden is on the packages using commonJS to improve.

@eps1lon eps1lon removed the PR: needs revision The pull request can't be merged. More details is available on the code review or fails in the CI label Jul 26, 2019
@eps1lon eps1lon merged commit bff38c1 into mui:master Jul 26, 2019
@TrySound
Copy link
Contributor Author

Yes, we did our best to fix all these issues in material-ui and friends.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Infrastructure work going on behind the scenes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants