-
Notifications
You must be signed in to change notification settings - Fork 27.4k
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
Enable swcLoader #29185
Enable swcLoader #29185
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Failing test suitesCommit: dda7019 test/development/acceptance/ReactRefreshLogBox-builtins.test.ts
Expand output● ReactRefreshLogBox › Module not found
test/integration/auto-export/test/index.test.js
Expand output● Auto Export › production › Supports commonjs 1
● Auto Export › production › Supports commonjs 2
● Auto Export › production › Refreshes query on mount
● Auto Export › production › should update asPath after mount
● Auto Export › production › should not replace URL with page name while asPath is delayed
● Auto Export › dev › Supports commonjs 1
● Auto Export › dev › Supports commonjs 2
● Auto Export › dev › should update asPath after mount
● Test suite failed to run
test/integration/amphtml/test/index.test.js
Expand output● AMP Usage › production mode › With basic AMP usage › should not output client pages for AMP only
● AMP Usage › production mode › With basic AMP usage › should not output client pages for AMP only with config exported after declaration
● AMP Usage › production mode › combined styles › should combine style tags
test/integration/custom-error/test/index.test.js
Expand output● Custom _error › dev mode 1 › should not warn with /_error and /404 when rendering error first
test/integration/i18n-support-custom-error/test/index.test.js
Expand output● Custom routes i18n › dev mode › should work also on client side routing
● Custom routes i18n › production mode › should work also on client side routing
test/integration/re-export-all-exports-from-page-disallowed/test/index.test.js
Expand output● Re-export all exports from page is disallowed › shows error when a page re-export all exports
|
Stats from current PRDefault Build (Increase detected
|
vercel/next.js canary | padmaia/next.js test-next-swc | Change | |
---|---|---|---|
buildDuration | 12.5s | 9.1s | -3.3s |
buildDurationCached | 2.9s | 3s | |
nodeModulesSize | 194 MB | 194 MB | -148 B |
Page Load Tests Overall decrease ⚠️
vercel/next.js canary | padmaia/next.js test-next-swc | Change | |
---|---|---|---|
/ failed reqs | 0 | 0 | ✓ |
/ total time (seconds) | 2.807 | 2.779 | -0.03 |
/ avg req/sec | 890.77 | 899.67 | +8.9 |
/error-in-render failed reqs | 0 | 0 | ✓ |
/error-in-render total time (seconds) | 1.264 | 1.316 | |
/error-in-render avg req/sec | 1978.08 | 1899.67 |
Client Bundles (main, webpack, commons) Overall increase ⚠️
vercel/next.js canary | padmaia/next.js test-next-swc | Change | |
---|---|---|---|
779.HASH.js gzip | 179 B | 179 B | ✓ |
framework-HASH.js gzip | 42.2 kB | 42.2 kB | ✓ |
main-HASH.js gzip | 26.9 kB | 26.7 kB | -281 B |
webpack-HASH.js gzip | 1.45 kB | 1.52 kB | |
675-HASH.js gzip | N/A | 10.8 kB | N/A |
Overall change | 70.8 kB | 81.3 kB |
Legacy Client Bundles (polyfills)
vercel/next.js canary | padmaia/next.js test-next-swc | Change | |
---|---|---|---|
polyfills-a4..dd70.js gzip | 31 kB | 31 kB | ✓ |
Overall change | 31 kB | 31 kB | ✓ |
Client Pages Overall decrease ✓
vercel/next.js canary | padmaia/next.js test-next-swc | Change | |
---|---|---|---|
_app-HASH.js gzip | 977 B | 1.23 kB | |
_error-HASH.js gzip | 194 B | 195 B | |
amp-HASH.js gzip | 311 B | 312 B | |
css-HASH.js gzip | 328 B | 328 B | ✓ |
dynamic-HASH.js gzip | 2.67 kB | 2.43 kB | -237 B |
head-HASH.js gzip | 351 B | 351 B | ✓ |
hooks-HASH.js gzip | 918 B | 633 B | -285 B |
image-HASH.js gzip | 4.12 kB | 558 B | -3.56 kB |
index-HASH.js gzip | 260 B | 263 B | |
link-HASH.js gzip | 1.66 kB | 1.88 kB | |
routerDirect..HASH.js gzip | 320 B | 320 B | ✓ |
script-HASH.js gzip | 386 B | 385 B | -1 B |
withRouter-HASH.js gzip | 319 B | 319 B | ✓ |
bb14e60e810b..30f.css gzip | 125 B | 125 B | ✓ |
Overall change | 12.9 kB | 9.33 kB | -3.61 kB |
Client Build Manifests Overall increase ⚠️
vercel/next.js canary | padmaia/next.js test-next-swc | Change | |
---|---|---|---|
_buildManifest.js gzip | 494 B | 514 B | |
Overall change | 494 B | 514 B |
Rendered Page Sizes Overall decrease ✓
vercel/next.js canary | padmaia/next.js test-next-swc | Change | |
---|---|---|---|
index.html gzip | 539 B | 537 B | -2 B |
link.html gzip | 551 B | 550 B | -1 B |
withRouter.html gzip | 532 B | 531 B | -1 B |
Overall change | 1.62 kB | 1.62 kB | -4 B |
Diffs
Diff for _buildManifest.js
@@ -1,33 +1,34 @@
self.__BUILD_MANIFEST = {
__rewrites: { beforeFiles: [], afterFiles: [], fallback: [] },
- "/": ["static\u002Fchunks\u002Fpages\u002Findex-b978e60b9d702fa80805.js"],
+ "/": ["static\u002Fchunks\u002Fpages\u002Findex-ab3eacf0db76ede5c34e.js"],
"/_error": [
- "static\u002Fchunks\u002Fpages\u002F_error-da8666f64dec58f0256c.js"
+ "static\u002Fchunks\u002Fpages\u002F_error-9e1a6d936e12ddc840ba.js"
],
- "/amp": ["static\u002Fchunks\u002Fpages\u002Famp-f2a7d08c8a34aef20244.js"],
+ "/amp": ["static\u002Fchunks\u002Fpages\u002Famp-8bc8c2d84cd1ee3af177.js"],
"/css": [
"static\u002Fcss\u002F59de118426c393f58653.css",
- "static\u002Fchunks\u002Fpages\u002Fcss-19090fefdf0ea278b474.js"
+ "static\u002Fchunks\u002Fpages\u002Fcss-b933e198cac52ec08478.js"
],
"/dynamic": [
- "static\u002Fchunks\u002Fpages\u002Fdynamic-d27debc5ab477ff7a21f.js"
+ "static\u002Fchunks\u002Fpages\u002Fdynamic-6d23c90f2595f3596b95.js"
],
- "/head": ["static\u002Fchunks\u002Fpages\u002Fhead-bb121808f5d725b16bf4.js"],
+ "/head": ["static\u002Fchunks\u002Fpages\u002Fhead-7bb5bee479e60e9cbbf6.js"],
"/hooks": [
- "static\u002Fchunks\u002Fpages\u002Fhooks-b247d7d93b59ee105030.js"
+ "static\u002Fchunks\u002Fpages\u002Fhooks-57657d9807f56726f7b7.js"
],
"/image": [
- "static\u002Fchunks\u002Fpages\u002Fimage-5e12b7aa334834dd607c.js"
+ "static\u002Fchunks\u002F675-e36478c6435f19ec761d.js",
+ "static\u002Fchunks\u002Fpages\u002Fimage-7adb256b36a03439bd79.js"
],
- "/link": ["static\u002Fchunks\u002Fpages\u002Flink-6c203ee999e47493e19d.js"],
+ "/link": ["static\u002Fchunks\u002Fpages\u002Flink-88e6441e88b717c1f4fe.js"],
"/routerDirect": [
- "static\u002Fchunks\u002Fpages\u002FrouterDirect-05d5c820a395af3eca42.js"
+ "static\u002Fchunks\u002Fpages\u002FrouterDirect-afb5e539aab48677ee82.js"
],
"/script": [
- "static\u002Fchunks\u002Fpages\u002Fscript-9bb97af83a32aad71249.js"
+ "static\u002Fchunks\u002Fpages\u002Fscript-3bd2b6d599dff985e742.js"
],
"/withRouter": [
- "static\u002Fchunks\u002Fpages\u002FwithRouter-a4b2da9a6aabc0207112.js"
+ "static\u002Fchunks\u002Fpages\u002FwithRouter-42d971b6e1d5b9681097.js"
],
sortedPages: [
"\u002F",
Diff for _app-HASH.js
@@ -1,54 +1,113 @@
(self["webpackChunk_N_E"] = self["webpackChunk_N_E"] || []).push([
[888],
{
- /***/ 6871: /***/ function(
+ /***/ 915: /***/ function(
__unused_webpack_module,
- exports,
+ __unused_webpack_exports,
__webpack_require__
) {
- "use strict";
-
- var _classCallCheck = __webpack_require__(4575);
-
- var _createClass = __webpack_require__(3913);
-
- var _inherits = __webpack_require__(2205);
-
- var _possibleConstructorReturn = __webpack_require__(8585);
+ (window.__NEXT_P = window.__NEXT_P || []).push([
+ "/_app",
+ function() {
+ return __webpack_require__(4596);
+ }
+ ]);
- var _getPrototypeOf = __webpack_require__(9754);
+ /***/
+ },
- var _regeneratorRuntime = __webpack_require__(7757);
+ /***/ 4596: /***/ function(
+ __unused_webpack_module,
+ exports,
+ __webpack_require__
+ ) {
+ "use strict";
- function _createSuper(Derived) {
- var hasNativeReflectConstruct = _isNativeReflectConstruct();
- return function _createSuperInternal() {
- var Super = _getPrototypeOf(Derived),
- result;
- if (hasNativeReflectConstruct) {
- var NewTarget = _getPrototypeOf(this).constructor;
- result = Reflect.construct(Super, arguments, NewTarget);
- } else {
- result = Super.apply(this, arguments);
- }
- return _possibleConstructorReturn(this, result);
- };
+ var _regeneratorRuntime = _interopRequireDefault1(
+ __webpack_require__(5666)
+ );
+ function _assertThisInitialized(self) {
+ if (self === void 0) {
+ throw new ReferenceError(
+ "this hasn't been initialised - super() hasn't been called"
+ );
+ }
+ return self;
}
-
- function _isNativeReflectConstruct() {
- if (typeof Reflect === "undefined" || !Reflect.construct) return false;
- if (Reflect.construct.sham) return false;
- if (typeof Proxy === "function") return true;
- try {
- Boolean.prototype.valueOf.call(
- Reflect.construct(Boolean, [], function() {})
+ function _classCallCheck(instance, Constructor) {
+ if (!(instance instanceof Constructor)) {
+ throw new TypeError("Cannot call a class as a function");
+ }
+ }
+ function _defineProperties(target, props) {
+ for (var i = 0; i < props.length; i++) {
+ var descriptor = props[i];
+ descriptor.enumerable = descriptor.enumerable || false;
+ descriptor.configurable = true;
+ if ("value" in descriptor) descriptor.writable = true;
+ Object.defineProperty(target, descriptor.key, descriptor);
+ }
+ }
+ function _createClass(Constructor, protoProps, staticProps) {
+ if (protoProps) _defineProperties(Constructor.prototype, protoProps);
+ if (staticProps) _defineProperties(Constructor, staticProps);
+ return Constructor;
+ }
+ function _getPrototypeOf(o) {
+ _getPrototypeOf = Object.setPrototypeOf
+ ? Object.getPrototypeOf
+ : function _getPrototypeOf(o) {
+ return o.__proto__ || Object.getPrototypeOf(o);
+ };
+ return _getPrototypeOf(o);
+ }
+ function _inherits(subClass, superClass) {
+ if (typeof superClass !== "function" && superClass !== null) {
+ throw new TypeError(
+ "Super expression must either be null or a function"
);
- return true;
- } catch (e) {
- return false;
}
+ subClass.prototype = Object.create(superClass && superClass.prototype, {
+ constructor: {
+ value: subClass,
+ writable: true,
+ configurable: true
+ }
+ });
+ if (superClass) _setPrototypeOf(subClass, superClass);
}
-
+ function _interopRequireDefault1(obj) {
+ return obj && obj.__esModule
+ ? obj
+ : {
+ default: obj
+ };
+ }
+ function _possibleConstructorReturn(self, call) {
+ if (
+ call &&
+ (_typeof(call) === "object" || typeof call === "function")
+ ) {
+ return call;
+ }
+ return _assertThisInitialized(self);
+ }
+ function _setPrototypeOf(o, p) {
+ _setPrototypeOf =
+ Object.setPrototypeOf ||
+ function _setPrototypeOf(o, p) {
+ o.__proto__ = p;
+ return o;
+ };
+ return _setPrototypeOf(o, p);
+ }
+ var _typeof = function(obj) {
+ return obj &&
+ typeof Symbol !== "undefined" &&
+ obj.constructor === Symbol
+ ? "symbol"
+ : typeof obj;
+ };
Object.defineProperty(exports, "__esModule", {
value: true
});
@@ -65,11 +124,8 @@
}
});
exports["default"] = void 0;
-
- var _react = _interopRequireDefault(__webpack_require__(7294));
-
- var _utils = __webpack_require__(9151);
-
+ var _react = _interopRequireDefault2(__webpack_require__(7294));
+ var _utils = __webpack_require__(4758);
function asyncGeneratorStep(
gen,
resolve,
@@ -86,21 +142,18 @@
reject(error);
return;
}
-
if (info.done) {
resolve(value);
} else {
Promise.resolve(value).then(_next, _throw);
}
}
-
function _asyncToGenerator(fn) {
return function() {
var self = this,
args = arguments;
return new Promise(function(resolve, reject) {
var gen = fn.apply(self, args);
-
function _next(value) {
asyncGeneratorStep(
gen,
@@ -112,7 +165,6 @@
value
);
}
-
function _throw(err) {
asyncGeneratorStep(
gen,
@@ -124,105 +176,77 @@
err
);
}
-
_next(undefined);
});
};
}
-
- function _interopRequireDefault(obj) {
+ function _interopRequireDefault2(obj) {
return obj && obj.__esModule
? obj
: {
default: obj
};
}
-
function _appGetInitialProps() {
- _appGetInitialProps =
- /**
- * `App` component is used for initialize of pages. It allows for overwriting and full control of the `page` initialization.
- * This allows for keeping state between navigation, custom error handling, injecting additional data.
- */
- _asyncToGenerator(
- /*#__PURE__*/ _regeneratorRuntime.mark(function _callee(_ref) {
- var Component, ctx, pageProps;
- return _regeneratorRuntime.wrap(function _callee$(_context) {
- while (1) {
- switch ((_context.prev = _context.next)) {
- case 0:
- (Component = _ref.Component), (ctx = _ref.ctx);
- _context.next = 3;
- return (0, _utils).loadGetInitialProps(Component, ctx);
-
- case 3:
- pageProps = _context.sent;
- return _context.abrupt("return", {
- pageProps: pageProps
- });
-
- case 5:
- case "end":
- return _context.stop();
- }
+ _appGetInitialProps = /**
+ * `App` component is used for initialize of pages. It allows for overwriting and full control of the `page` initialization.
+ * This allows for keeping state between navigation, custom error handling, injecting additional data.
+ */ _asyncToGenerator(
+ _regeneratorRuntime.default.mark(function _callee(param) {
+ var Component = param.Component,
+ ctx = param.ctx;
+ var pageProps;
+ return _regeneratorRuntime.default.wrap(function _callee$(_ctx) {
+ while (1)
+ switch ((_ctx.prev = _ctx.next)) {
+ case 0:
+ _ctx.next = 2;
+ return (0, _utils).loadGetInitialProps(Component, ctx);
+ case 2:
+ pageProps = _ctx.sent;
+ return _ctx.abrupt("return", {
+ pageProps: pageProps
+ });
+ case 4:
+ case "end":
+ return _ctx.stop();
}
- }, _callee);
- })
- );
+ }, _callee);
+ })
+ );
return _appGetInitialProps.apply(this, arguments);
}
-
function appGetInitialProps(_) {
return _appGetInitialProps.apply(this, arguments);
}
-
- var App = /*#__PURE__*/ (function(_react$default$Compon) {
- _inherits(App, _react$default$Compon);
-
- var _super = _createSuper(App);
-
+ var App = /*#__PURE__*/ (function(_Component) {
+ _inherits(App, _Component);
function App() {
_classCallCheck(this, App);
-
- return _super.apply(this, arguments);
+ return _possibleConstructorReturn(
+ this,
+ _getPrototypeOf(App).apply(this, arguments)
+ );
}
-
_createClass(App, [
{
key: "render",
value: function render() {
- var _this$props = this.props,
- Component = _this$props.Component,
- pageProps = _this$props.pageProps;
- return /*#__PURE__*/ _react["default"].createElement(
+ var _props = this.props,
+ Component = _props.Component,
+ pageProps = _props.pageProps;
+ return /*#__PURE__*/ _react.default.createElement(
Component,
Object.assign({}, pageProps)
);
}
}
]);
-
return App;
- })(_react["default"].Component);
-
+ })(_react.default.Component);
App.origGetInitialProps = appGetInitialProps;
App.getInitialProps = appGetInitialProps;
- exports["default"] = App;
-
- /***/
- },
-
- /***/ 915: /***/ function(
- __unused_webpack_module,
- __unused_webpack_exports,
- __webpack_require__
- ) {
- (window.__NEXT_P = window.__NEXT_P || []).push([
- "/_app",
- function() {
- return __webpack_require__(6871);
- }
- ]);
+ exports["default"] = App; //# sourceMappingURL=_app.js.map
/***/
}
@@ -233,7 +257,7 @@
return __webpack_require__((__webpack_require__.s = moduleId));
};
/******/ __webpack_require__.O(0, [774, 179], function() {
- return __webpack_exec__(915), __webpack_exec__(7356);
+ return __webpack_exec__(915), __webpack_exec__(557);
});
/******/ var __webpack_exports__ = __webpack_require__.O();
/******/ _N_E = __webpack_exports__;
Diff for _error-HASH.js
@@ -9,7 +9,7 @@
(window.__NEXT_P = window.__NEXT_P || []).push([
"/_error",
function() {
- return __webpack_require__(7558);
+ return __webpack_require__(5509);
}
]);
Diff for amp-HASH.js
@@ -6,12 +6,27 @@
__unused_webpack_exports,
__webpack_require__
) {
- module.exports = __webpack_require__(4783);
+ module.exports = __webpack_require__(6446);
/***/
},
- /***/ 468: /***/ function(
+ /***/ 6071: /***/ function(
+ __unused_webpack_module,
+ __unused_webpack_exports,
+ __webpack_require__
+ ) {
+ (window.__NEXT_P = window.__NEXT_P || []).push([
+ "/amp",
+ function() {
+ return __webpack_require__(7659);
+ }
+ ]);
+
+ /***/
+ },
+
+ /***/ 7659: /***/ function(
__unused_webpack_module,
__webpack_exports__,
__webpack_require__
@@ -40,21 +55,6 @@
: "normal mode";
}
- /***/
- },
-
- /***/ 6071: /***/ function(
- __unused_webpack_module,
- __unused_webpack_exports,
- __webpack_require__
- ) {
- (window.__NEXT_P = window.__NEXT_P || []).push([
- "/amp",
- function() {
- return __webpack_require__(468);
- }
- ]);
-
/***/
}
},
Diff for css-HASH.js
@@ -1,52 +1,51 @@
(self["webpackChunk_N_E"] = self["webpackChunk_N_E"] || []).push([
[706],
{
- /***/ 8600: /***/ function(
+ /***/ 7083: /***/ function(
+ __unused_webpack_module,
+ __unused_webpack_exports,
+ __webpack_require__
+ ) {
+ (window.__NEXT_P = window.__NEXT_P || []).push([
+ "/css",
+ function() {
+ return __webpack_require__(9436);
+ }
+ ]);
+
+ /***/
+ },
+
+ /***/ 9436: /***/ function(
__unused_webpack_module,
__webpack_exports__,
__webpack_require__
) {
"use strict";
__webpack_require__.r(__webpack_exports__);
+ /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
+ 5893
+ );
/* harmony import */ var _css_module_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
1785
);
/* harmony import */ var _css_module_css__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/ __webpack_require__.n(
_css_module_css__WEBPACK_IMPORTED_MODULE_1__
);
- /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
- 5893
- );
- var Page = function Page() {
- return /*#__PURE__*/ (0,
+ var Page = function() {
+ /*#__PURE__*/ return (0,
react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", {
className: _css_module_css__WEBPACK_IMPORTED_MODULE_1___default()
.helloWorld,
- children: "Hello world \uD83D\uDC4B"
+ children: "Hello world 👋"
});
};
-
/* harmony default export */ __webpack_exports__["default"] = Page;
/***/
},
- /***/ 7083: /***/ function(
- __unused_webpack_module,
- __unused_webpack_exports,
- __webpack_require__
- ) {
- (window.__NEXT_P = window.__NEXT_P || []).push([
- "/css",
- function() {
- return __webpack_require__(8600);
- }
- ]);
-
- /***/
- },
-
/***/ 1785: /***/ function(module) {
// extracted by mini-css-extract-plugin
module.exports = { helloWorld: "css_helloWorld__2Fhmt" };
Diff for dynamic-HASH.js
@@ -1,7 +1,22 @@
(self["webpackChunk_N_E"] = self["webpackChunk_N_E"] || []).push([
[739],
{
- /***/ 1897: /***/ function(
+ /***/ 1893: /***/ function(
+ __unused_webpack_module,
+ __unused_webpack_exports,
+ __webpack_require__
+ ) {
+ (window.__NEXT_P = window.__NEXT_P || []).push([
+ "/dynamic",
+ function() {
+ return __webpack_require__(7202);
+ }
+ ]);
+
+ /***/
+ },
+
+ /***/ 1215: /***/ function(
__unused_webpack_module,
exports,
__webpack_require__
@@ -9,57 +24,54 @@
"use strict";
var __webpack_unused_export__;
- var _defineProperty = __webpack_require__(9713);
-
- function ownKeys(object, enumerableOnly) {
- var keys = Object.keys(object);
- if (Object.getOwnPropertySymbols) {
- var symbols = Object.getOwnPropertySymbols(object);
- if (enumerableOnly) {
- symbols = symbols.filter(function(sym) {
- return Object.getOwnPropertyDescriptor(object, sym).enumerable;
- });
- }
- keys.push.apply(keys, symbols);
+ 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;
+ }
+ function _instanceof(left, right) {
+ if (
+ right != null &&
+ typeof Symbol !== "undefined" &&
+ right[Symbol.hasInstance]
+ ) {
+ return right[Symbol.hasInstance](left);
+ } else {
+ return left instanceof right;
}
- return keys;
}
-
function _objectSpread(target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i] != null ? arguments[i] : {};
- if (i % 2) {
- ownKeys(Object(source), true).forEach(function(key) {
- _defineProperty(target, key, source[key]);
- });
- } else if (Object.getOwnPropertyDescriptors) {
- Object.defineProperties(
- target,
- Object.getOwnPropertyDescriptors(source)
+ var ownKeys = Object.keys(source);
+ if (typeof Object.getOwnPropertySymbols === "function") {
+ ownKeys = ownKeys.concat(
+ Object.getOwnPropertySymbols(source).filter(function(sym) {
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
+ })
);
- } else {
- ownKeys(Object(source)).forEach(function(key) {
- Object.defineProperty(
- target,
- key,
- Object.getOwnPropertyDescriptor(source, key)
- );
- });
}
+ ownKeys.forEach(function(key) {
+ _defineProperty(target, key, source[key]);
+ });
}
return target;
}
-
__webpack_unused_export__ = {
value: true
};
__webpack_unused_export__ = noSSR;
exports["default"] = dynamic;
-
var _react = _interopRequireDefault(__webpack_require__(7294));
-
- var _loadable = _interopRequireDefault(__webpack_require__(8835));
-
+ var _loadable = _interopRequireDefault(__webpack_require__(7213));
function _interopRequireDefault(obj) {
return obj && obj.__esModule
? obj
@@ -67,22 +79,19 @@
default: obj
};
}
-
- var isServerSide = false;
-
+ var isServerSide = typeof window === "undefined";
function noSSR(LoadableInitializer, loadableOptions) {
// Removing webpack and modules means react-loadable won't try preloading
delete loadableOptions.webpack;
- delete loadableOptions.modules; // This check is necessary to prevent react-loadable from initializing on the server
-
+ delete loadableOptions.modules;
+ // This check is necessary to prevent react-loadable from initializing on the server
if (!isServerSide) {
return LoadableInitializer(loadableOptions);
}
-
- var Loading = loadableOptions.loading; // This will only be rendered on the server side
-
+ var Loading = loadableOptions.loading;
+ // This will only be rendered on the server side
return function() {
- return /*#__PURE__*/ _react["default"].createElement(Loading, {
+ /*#__PURE__*/ return _react.default.createElement(Loading, {
error: null,
isLoading: true,
pastDelay: false,
@@ -90,46 +99,38 @@
});
};
}
-
function dynamic(dynamicOptions, options) {
- var loadableFn = _loadable["default"];
+ var loadableFn = _loadable.default;
var loadableOptions = {
// A loading component is not required, so we default it
- loading: function loading(_ref) {
- var error = _ref.error,
- isLoading = _ref.isLoading,
- pastDelay = _ref.pastDelay;
+ loading: function(param) {
+ var error = param.error,
+ isLoading = param.isLoading,
+ pastDelay = param.pastDelay;
if (!pastDelay) return null;
-
if (false) {
}
-
return null;
}
- }; // Support for direct import(), eg: dynamic(import('../hello-world'))
+ };
+ // Support for direct import(), eg: dynamic(import('../hello-world'))
// Note that this is only kept for the edge case where someone is passing in a promise as first argument
// The react-loadable babel plugin will turn dynamic(import('../hello-world')) into dynamic(() => import('../hello-world'))
// To make sure we don't execute the import without rendering first
-
- if (dynamicOptions instanceof Promise) {
+ if (_instanceof(dynamicOptions, Promise)) {
loadableOptions.loader = function() {
return dynamicOptions;
- }; // Support for having import as a function, eg: dynamic(() => import('../hello-world'))
+ };
+ // Support for having import as a function, eg: dynamic(() => import('../hello-world'))
} else if (typeof dynamicOptions === "function") {
- loadableOptions.loader = dynamicOptions; // Support for having first argument being options, eg: dynamic({loader: import('../hello-world')})
+ loadableOptions.loader = dynamicOptions;
+ // Support for having first argument being options, eg: dynamic({loader: import('../hello-world')})
} else if (typeof dynamicOptions === "object") {
- loadableOptions = _objectSpread(
- _objectSpread({}, loadableOptions),
- dynamicOptions
- );
- } // Support for passing options, eg: dynamic(import('../hello-world'), {loading: () => <p>Loading something</p>})
-
- loadableOptions = _objectSpread(
- _objectSpread({}, loadableOptions),
- options
- );
+ loadableOptions = _objectSpread({}, loadableOptions, dynamicOptions);
+ }
+ // Support for passing options, eg: dynamic(import('../hello-world'), {loading: () => <p>Loading something</p>})
+ loadableOptions = _objectSpread({}, loadableOptions, options);
var suspenseOptions = loadableOptions;
-
if (true) {
// Error if react root is not enabled and `suspense` option is set to true
if (true && suspenseOptions.suspense) {
@@ -139,35 +140,33 @@
);
}
}
-
if (suspenseOptions.suspense) {
return loadableFn(suspenseOptions);
- } // coming from build/babel/plugins/react-loadable-plugin.js
-
+ }
+ // coming from build/babel/plugins/react-loadable-plugin.js
if (loadableOptions.loadableGenerated) {
loadableOptions = _objectSpread(
- _objectSpread({}, loadableOptions),
+ {},
+ loadableOptions,
loadableOptions.loadableGenerated
);
delete loadableOptions.loadableGenerated;
- } // support for disabling server side rendering, eg: dynamic(import('../hello-world'), {ssr: false})
-
+ }
+ // support for disabling server side rendering, eg: dynamic(import('../hello-world'), {ssr: false})
if (typeof loadableOptions.ssr === "boolean") {
if (!loadableOptions.ssr) {
delete loadableOptions.ssr;
return noSSR(loadableFn, loadableOptions);
}
-
delete loadableOptions.ssr;
}
-
return loadableFn(loadableOptions);
- }
+ } //# sourceMappingURL=dynamic.js.map
/***/
},
- /***/ 3358: /***/ function(
+ /***/ 3197: /***/ function(
__unused_webpack_module,
exports,
__webpack_require__
@@ -178,9 +177,7 @@
value: true
});
exports.LoadableContext = void 0;
-
var _react = _interopRequireDefault(__webpack_require__(7294));
-
function _interopRequireDefault(obj) {
return obj && obj.__esModule
? obj
@@ -188,156 +185,77 @@
default: obj
};
}
-
- var LoadableContext = _react["default"].createContext(null);
-
+ var LoadableContext = _react.default.createContext(null);
exports.LoadableContext = LoadableContext;
-
if (false) {
- }
+ } //# sourceMappingURL=loadable-context.js.map
/***/
},
- /***/ 8835: /***/ function(
+ /***/ 7213: /***/ function(
__unused_webpack_module,
exports,
__webpack_require__
) {
"use strict";
- var _classCallCheck = __webpack_require__(4575);
-
- var _createClass = __webpack_require__(3913);
-
- var _defineProperty = __webpack_require__(9713);
-
- function ownKeys(object, enumerableOnly) {
- var keys = Object.keys(object);
- if (Object.getOwnPropertySymbols) {
- var symbols = Object.getOwnPropertySymbols(object);
- if (enumerableOnly) {
- symbols = symbols.filter(function(sym) {
- return Object.getOwnPropertyDescriptor(object, sym).enumerable;
- });
- }
- keys.push.apply(keys, symbols);
+ function _classCallCheck(instance, Constructor) {
+ if (!(instance instanceof Constructor)) {
+ throw new TypeError("Cannot call a class as a function");
}
- return keys;
}
-
+ function _defineProperties(target, props) {
+ for (var i = 0; i < props.length; i++) {
+ var descriptor = props[i];
+ descriptor.enumerable = descriptor.enumerable || false;
+ descriptor.configurable = true;
+ if ("value" in descriptor) descriptor.writable = true;
+ Object.defineProperty(target, descriptor.key, descriptor);
+ }
+ }
+ function _createClass(Constructor, protoProps, staticProps) {
+ if (protoProps) _defineProperties(Constructor.prototype, protoProps);
+ if (staticProps) _defineProperties(Constructor, staticProps);
+ return Constructor;
+ }
+ 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;
+ }
function _objectSpread(target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i] != null ? arguments[i] : {};
- if (i % 2) {
- ownKeys(Object(source), true).forEach(function(key) {
- _defineProperty(target, key, source[key]);
- });
- } else if (Object.getOwnPropertyDescriptors) {
- Object.defineProperties(
- target,
- Object.getOwnPropertyDescriptors(source)
+ var ownKeys = Object.keys(source);
+ if (typeof Object.getOwnPropertySymbols === "function") {
+ ownKeys = ownKeys.concat(
+ Object.getOwnPropertySymbols(source).filter(function(sym) {
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
+ })
);
- } else {
- ownKeys(Object(source)).forEach(function(key) {
- Object.defineProperty(
- target,
- key,
- Object.getOwnPropertyDescriptor(source, key)
- );
- });
}
+ ownKeys.forEach(function(key) {
+ _defineProperty(target, key, source[key]);
+ });
}
return target;
}
-
- function _createForOfIteratorHelper(o, allowArrayLike) {
- var it =
- (typeof Symbol !== "undefined" && o[Symbol.iterator]) ||
- o["@@iterator"];
- if (!it) {
- if (
- Array.isArray(o) ||
- (it = _unsupportedIterableToArray(o)) ||
- (allowArrayLike && o && typeof o.length === "number")
- ) {
- if (it) o = it;
- var i = 0;
- var F = function F() {};
- return {
- s: F,
- n: function n() {
- if (i >= o.length) return { done: true };
- return { done: false, value: o[i++] };
- },
- e: function e(_e) {
- throw _e;
- },
- f: F
- };
- }
- throw new TypeError(
- "Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."
- );
- }
- var normalCompletion = true,
- didErr = false,
- err;
- return {
- s: function s() {
- it = it.call(o);
- },
- n: function n() {
- var step = it.next();
- normalCompletion = step.done;
- return step;
- },
- e: function e(_e2) {
- didErr = true;
- err = _e2;
- },
- f: function f() {
- try {
- if (!normalCompletion && it["return"] != null) it["return"]();
- } finally {
- if (didErr) throw err;
- }
- }
- };
- }
-
- function _unsupportedIterableToArray(o, minLen) {
- if (!o) return;
- if (typeof o === "string") return _arrayLikeToArray(o, minLen);
- var n = Object.prototype.toString.call(o).slice(8, -1);
- if (n === "Object" && o.constructor) n = o.constructor.name;
- if (n === "Map" || n === "Set") return Array.from(o);
- if (
- n === "Arguments" ||
- /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)
- )
- return _arrayLikeToArray(o, minLen);
- }
-
- function _arrayLikeToArray(arr, len) {
- if (len == null || len > arr.length) len = arr.length;
- for (var i = 0, arr2 = new Array(len); i < len; i++) {
- arr2[i] = arr[i];
- }
- return arr2;
- }
-
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
-
var _react = _interopRequireDefault(__webpack_require__(7294));
-
var _useSubscription = __webpack_require__(7161);
-
- var _loadableContext = __webpack_require__(3358);
-
+ var _loadableContext = __webpack_require__(3197);
function _interopRequireDefault(obj) {
return obj && obj.__esModule
? obj
@@ -345,11 +263,9 @@
default: obj
};
}
-
var ALL_INITIALIZERS = [];
var READY_INITIALIZERS = [];
var initialized = false;
-
function load(loader) {
var promise = loader();
var state = {
@@ -363,39 +279,18 @@
state.loaded = loaded;
return loaded;
})
- ["catch"](function(err) {
+ .catch(function(err) {
state.loading = false;
state.error = err;
throw err;
});
return state;
}
-
function resolve(obj) {
- return obj && obj.__esModule ? obj["default"] : obj;
+ return obj && obj.__esModule ? obj.default : obj;
}
-
function createLoadableComponent(loadFn, options) {
- var opts = Object.assign(
- {
- loader: null,
- loading: null,
- delay: 200,
- timeout: null,
- webpack: null,
- modules: null,
- suspense: false
- },
- options
- );
-
- if (opts.suspense) {
- opts.lazy = _react["default"].lazy(opts.loader);
- }
-
- var subscription = null;
-
- function init() {
+ var init = function init() {
if (!subscription) {
var sub = new LoadableSubscription(loadFn, opts);
subscription = {
@@ -405,51 +300,15 @@
promise: sub.promise.bind(sub)
};
}
-
return subscription.promise();
- } // Server only
-
- if (false) {
- } // Client only
-
- if (
- !initialized &&
- true &&
- typeof opts.webpack === "function" &&
- "function" === "function" &&
- !opts.suspense
- ) {
- var moduleIds = opts.webpack();
- READY_INITIALIZERS.push(function(ids) {
- var _iterator = _createForOfIteratorHelper(moduleIds),
- _step;
-
- try {
- for (_iterator.s(); !(_step = _iterator.n()).done; ) {
- var moduleId = _step.value;
-
- if (ids.indexOf(moduleId) !== -1) {
- return init();
- }
- }
- } catch (err) {
- _iterator.e(err);
- } finally {
- _iterator.f();
- }
- });
- }
-
- function LoadableImpl(props, ref) {
+ };
+ var LoadableImpl = function LoadableImpl(props, ref) {
init();
-
- var context = _react["default"].useContext(
+ var context = _react.default.useContext(
_loadableContext.LoadableContext
);
-
var state = (0, _useSubscription).useSubscription(subscription);
-
- _react["default"].useImperativeHandle(
+ _react.default.useImperativeHandle(
ref,
function() {
return {
@@ -458,17 +317,15 @@
},
[]
);
-
if (context && Array.isArray(opts.modules)) {
opts.modules.forEach(function(moduleName) {
context(moduleName);
});
}
-
- return _react["default"].useMemo(
+ return _react.default.useMemo(
function() {
if (state.loading || state.error) {
- return _react["default"].createElement(opts.loading, {
+ return _react.default.createElement(opts.loading, {
isLoading: state.loading,
pastDelay: state.pastDelay,
timedOut: state.timedOut,
@@ -476,7 +333,7 @@
retry: subscription.retry
});
} else if (state.loaded) {
- return _react["default"].createElement(
+ return _react.default.createElement(
resolve(state.loaded),
props
);
@@ -486,35 +343,85 @@
},
[props, state]
);
- }
-
- function LazyImpl(props, ref) {
- return _react["default"].createElement(
+ };
+ var LazyImpl = function LazyImpl(props, ref) {
+ return _react.default.createElement(
opts.lazy,
- _objectSpread(
- _objectSpread({}, props),
- {},
- {
- ref: ref
- }
- )
+ _objectSpread({}, props, {
+ ref: ref
+ })
);
+ };
+ var opts = Object.assign(
+ {
+ loader: null,
+ loading: null,
+ delay: 200,
+ timeout: null,
+ webpack: null,
+ modules: null,
+ suspense: false
+ },
+ options
+ );
+ if (opts.suspense) {
+ opts.lazy = _react.default.lazy(opts.loader);
+ }
+ var subscription = null;
+ // Server only
+ if (typeof window === "undefined" && !opts.suspense) {
+ ALL_INITIALIZERS.push(init);
+ }
+ // Client only
+ if (
+ !initialized &&
+ typeof window !== "undefined" &&
+ typeof opts.webpack === "function" &&
+ "function" === "function" &&
+ !opts.suspense
+ ) {
+ var moduleIds = opts.webpack();
+ READY_INITIALIZERS.push(function(ids) {
+ var _iteratorNormalCompletion = true,
+ _didIteratorError = false,
+ _iteratorError = undefined;
+ try {
+ for (
+ var _iterator = moduleIds[Symbol.iterator](), _step;
+ !(_iteratorNormalCompletion = (_step = _iterator.next()).done);
+ _iteratorNormalCompletion = true
+ ) {
+ var moduleId = _step.value;
+ if (ids.indexOf(moduleId) !== -1) {
+ return init();
+ }
+ }
+ } catch (err) {
+ _didIteratorError = true;
+ _iteratorError = err;
+ } finally {
+ try {
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
+ _iterator.return();
+ }
+ } finally {
+ if (_didIteratorError) {
+ throw _iteratorError;
+ }
+ }
+ }
+ });
}
-
var LoadableComponent = opts.suspense ? LazyImpl : LoadableImpl;
-
LoadableComponent.preload = function() {
return !opts.suspense && init();
};
-
LoadableComponent.displayName = "LoadableComponent";
- return _react["default"].forwardRef(LoadableComponent);
+ return _react.default.forwardRef(LoadableComponent);
}
-
var LoadableSubscription = /*#__PURE__*/ (function() {
function LoadableSubscription(loadFn, opts) {
_classCallCheck(this, LoadableSubscription);
-
this._loadFn = loadFn;
this._opts = opts;
this._callbacks = new Set();
@@ -522,7 +429,6 @@
this._timeout = null;
this.retry();
}
-
_createClass(LoadableSubscription, [
{
key: "promise",
@@ -533,23 +439,23 @@
{
key: "retry",
value: function retry() {
- var _this = this;
-
+ var _this = this,
+ _this1 = this;
this._clearTimeouts();
-
this._res = this._loadFn(this._opts.loader);
this._state = {
pastDelay: false,
timedOut: false
};
- var res = this._res,
- opts = this._opts;
-
+ var ref = this,
+ res = ref._res,
+ opts = ref._opts;
if (res.loading) {
if (typeof opts.delay === "number") {
if (opts.delay === 0) {
this._state.pastDelay = true;
} else {
+ var _this = this;
this._delay = setTimeout(function() {
_this._update({
pastDelay: true
@@ -557,8 +463,8 @@
}, opts.delay);
}
}
-
if (typeof opts.timeout === "number") {
+ var _this = this;
this._timeout = setTimeout(function() {
_this._update({
timedOut: true
@@ -566,19 +472,15 @@
}, opts.timeout);
}
}
-
this._res.promise
.then(function() {
_this._update({});
-
_this._clearTimeouts();
})
- ["catch"](function(_err) {
- _this._update({});
-
- _this._clearTimeouts();
+ .catch(function(_err) {
+ _this1._update({});
+ _this1._clearTimeouts();
});
-
this._update({});
}
},
@@ -586,8 +488,8 @@
key: "_update",
value: function _update(partial) {
this._state = _objectSpread(
- _objectSpread({}, this._state),
{},
+ this._state,
{
error: this._res.error,
loaded: this._res.loaded,
@@ -595,7 +497,6 @@
},
partial
);
-
this._callbacks.forEach(function(callback) {
return callback();
});
@@ -617,71 +518,57 @@
{
key: "subscribe",
value: function subscribe(callback) {
- var _this2 = this;
-
+ var _this = this;
this._callbacks.add(callback);
-
return function() {
- _this2._callbacks["delete"](callback);
+ _this._callbacks.delete(callback);
};
}
}
]);
-
return LoadableSubscription;
})();
-
function Loadable(opts) {
return createLoadableComponent(load, opts);
}
-
function flushInitializers(initializers, ids) {
var promises = [];
-
while (initializers.length) {
var init = initializers.pop();
promises.push(init(ids));
}
-
return Promise.all(promises).then(function() {
if (initializers.length) {
return flushInitializers(initializers, ids);
}
});
}
-
Loadable.preloadAll = function() {
return new Promise(function(resolveInitializers, reject) {
flushInitializers(ALL_INITIALIZERS).then(resolveInitializers, reject);
});
};
-
- Loadable.preloadReady = function() {
- var ids =
- arguments.length > 0 && arguments[0] !== undefined
- ? arguments[0]
- : [];
+ Loadable.preloadReady = function(param) {
+ var ids = param === void 0 ? [] : param;
return new Promise(function(resolvePreload) {
- var res = function res() {
+ var res = function() {
initialized = true;
return resolvePreload();
- }; // We always will resolve, errors should be handled within loading UIs.
-
+ };
+ // We always will resolve, errors should be handled within loading UIs.
flushInitializers(READY_INITIALIZERS, ids).then(res, res);
});
};
-
- if (true) {
+ if (typeof window !== "undefined") {
window.__NEXT_PRELOADREADY = Loadable.preloadReady;
}
-
var _default = Loadable;
- exports["default"] = _default;
+ exports["default"] = _default; //# sourceMappingURL=loadable.js.map
/***/
},
- /***/ 2862: /***/ function(
+ /***/ 7202: /***/ function(
__unused_webpack_module,
__webpack_exports__,
__webpack_require__
@@ -694,78 +581,60 @@
}
/* harmony export */
});
- /* harmony import */ var next_dynamic__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
- 5152
- );
- /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
+ /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
5893
);
+ /* harmony import */ var next_dynamic__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
+ 5152
+ );
var DynamicHello = (0,
- next_dynamic__WEBPACK_IMPORTED_MODULE_0__["default"])(
+ next_dynamic__WEBPACK_IMPORTED_MODULE_1__["default"])(
function() {
return __webpack_require__
- .e(/* import() */ 779)
- .then(__webpack_require__.bind(__webpack_require__, 2779));
+ .e(/* import() */ 770)
+ .then(__webpack_require__.bind(__webpack_require__, 5770));
},
{
loadableGenerated: {
- webpack: function webpack() {
- return [/*require.resolve*/ 2779];
+ webpack: function() {
+ return [/*require.resolve*/ 5770];
},
modules: ["dynamic.js -> " + "../components/hello"]
}
}
);
-
- var Page = function Page() {
- return /*#__PURE__*/ (0,
- react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(
- react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.Fragment,
+ var Page = function() {
+ /*#__PURE__*/ return (0,
+ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(
+ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment,
{
children: [
/*#__PURE__*/ (0,
- react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("p", {
+ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("p", {
children: "testing next/dynamic size"
}),
/*#__PURE__*/ (0,
- react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(
+ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(
DynamicHello,
{}
)
]
}
);
- }; // we add getServerSideProps to prevent static optimization
- // to allow us to compare server-side changes
-
+ };
var __N_SSP = true;
/* harmony default export */ __webpack_exports__["default"] = Page;
/***/
},
- /***/ 1893: /***/ function(
- __unused_webpack_module,
- __unused_webpack_exports,
- __webpack_require__
- ) {
- (window.__NEXT_P = window.__NEXT_P || []).push([
- "/dynamic",
- function() {
- return __webpack_require__(2862);
- }
- ]);
-
- /***/
- },
-
/***/ 5152: /***/ function(
module,
__unused_webpack_exports,
__webpack_require__
) {
- module.exports = __webpack_require__(1897);
+ module.exports = __webpack_require__(1215);
/***/
}
Diff for head-HASH.js
@@ -1,7 +1,22 @@
(self["webpackChunk_N_E"] = self["webpackChunk_N_E"] || []).push([
[645],
{
- /***/ 8488: /***/ function(
+ /***/ 4251: /***/ function(
+ __unused_webpack_module,
+ __unused_webpack_exports,
+ __webpack_require__
+ ) {
+ (window.__NEXT_P = window.__NEXT_P || []).push([
+ "/head",
+ function() {
+ return __webpack_require__(223);
+ }
+ ]);
+
+ /***/
+ },
+
+ /***/ 223: /***/ function(
__unused_webpack_module,
__webpack_exports__,
__webpack_require__
@@ -14,66 +29,49 @@
}
/* harmony export */
});
- /* harmony import */ var next_head__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
- 9008
- );
- /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
+ /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
5893
);
+ /* harmony import */ var next_head__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
+ 9008
+ );
- var Page = function Page() {
- return /*#__PURE__*/ (0,
- react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(
- react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.Fragment,
+ var Page = function() {
+ /*#__PURE__*/ return (0,
+ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(
+ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment,
{
children: [
/*#__PURE__*/ (0,
- react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(
- next_head__WEBPACK_IMPORTED_MODULE_0__["default"],
+ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(
+ next_head__WEBPACK_IMPORTED_MODULE_1__["default"],
{
children: /*#__PURE__*/ (0,
- react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("title", {
+ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("title", {
children: "hello world"
})
}
),
/*#__PURE__*/ (0,
- react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("p", {
+ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("p", {
children: "testing next/head size"
})
]
}
);
- }; // we add getServerSideProps to prevent static optimization
- // to allow us to compare server-side changes
-
+ };
var __N_SSP = true;
/* harmony default export */ __webpack_exports__["default"] = Page;
/***/
},
- /***/ 4251: /***/ function(
- __unused_webpack_module,
- __unused_webpack_exports,
- __webpack_require__
- ) {
- (window.__NEXT_P = window.__NEXT_P || []).push([
- "/head",
- function() {
- return __webpack_require__(8488);
- }
- ]);
-
- /***/
- },
-
/***/ 9008: /***/ function(
module,
__unused_webpack_exports,
__webpack_require__
) {
- module.exports = __webpack_require__(7006);
+ module.exports = __webpack_require__(1495);
/***/
}
Diff for hooks-HASH.js
@@ -1,43 +1,56 @@
(self["webpackChunk_N_E"] = self["webpackChunk_N_E"] || []).push([
[757],
{
- /***/ 4925: /***/ function(
+ /***/ 1470: /***/ function(
+ __unused_webpack_module,
+ __unused_webpack_exports,
+ __webpack_require__
+ ) {
+ (window.__NEXT_P = window.__NEXT_P || []).push([
+ "/hooks",
+ function() {
+ return __webpack_require__(522);
+ }
+ ]);
+
+ /***/
+ },
+
+ /***/ 522: /***/ function(
__unused_webpack_module,
__webpack_exports__,
__webpack_require__
) {
"use strict";
- // ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);
-
- // EXPORTS
- __webpack_require__.d(__webpack_exports__, {
- default: function() {
- return /* binding */ hooks;
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
+ /* harmony export */ default: function() {
+ return /* export default binding */ __WEBPACK_DEFAULT_EXPORT__;
}
- }); // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js
+ /* harmony export */
+ });
+ /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
+ 5893
+ );
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
+ 7294
+ );
function _arrayWithHoles(arr) {
if (Array.isArray(arr)) return arr;
- } // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js
+ }
function _iterableToArrayLimit(arr, i) {
- var _i =
- arr == null
- ? null
- : (typeof Symbol !== "undefined" && arr[Symbol.iterator]) ||
- arr["@@iterator"];
-
- if (_i == null) return;
var _arr = [];
var _n = true;
var _d = false;
-
- var _s, _e;
-
+ var _e = undefined;
try {
- for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
+ for (
+ var _i = arr[Symbol.iterator](), _s;
+ !(_n = (_s = _i.next()).done);
+ _n = true
+ ) {
_arr.push(_s.value);
-
if (i && _arr.length === i) break;
}
} catch (err) {
@@ -50,103 +63,69 @@
if (_d) throw _e;
}
}
-
return _arr;
- } // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js
- function _arrayLikeToArray(arr, len) {
- if (len == null || len > arr.length) len = arr.length;
-
- for (var i = 0, arr2 = new Array(len); i < len; i++) {
- arr2[i] = arr[i];
- }
-
- return arr2;
- } // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js
- function _unsupportedIterableToArray(o, minLen) {
- if (!o) return;
- if (typeof o === "string") return _arrayLikeToArray(o, minLen);
- var n = Object.prototype.toString.call(o).slice(8, -1);
- if (n === "Object" && o.constructor) n = o.constructor.name;
- if (n === "Map" || n === "Set") return Array.from(o);
- if (
- n === "Arguments" ||
- /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)
- )
- return _arrayLikeToArray(o, minLen);
- } // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js
+ }
function _nonIterableRest() {
throw new TypeError(
- "Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."
+ "Invalid attempt to destructure non-iterable instance"
);
- } // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js
+ }
function _slicedToArray(arr, i) {
return (
_arrayWithHoles(arr) ||
_iterableToArrayLimit(arr, i) ||
- _unsupportedIterableToArray(arr, i) ||
_nonIterableRest()
);
}
- // EXTERNAL MODULE: ./node_modules/react/index.js
- var react = __webpack_require__(7294);
- // EXTERNAL MODULE: ./node_modules/react/jsx-runtime.js
- var jsx_runtime = __webpack_require__(5893); // CONCATENATED MODULE: ./pages/hooks.js
- /* harmony default export */ var hooks = function() {
- var _React$useState = react.useState(0),
- _React$useState2 = _slicedToArray(_React$useState, 2),
- clicks1 = _React$useState2[0],
- setClicks1 = _React$useState2[1];
-
- var _useState = (0, react.useState)(0),
- clicks2 = _useState[0],
- setClicks2 = _useState[1];
-
- var doClick1 = react.useCallback(
+ /* harmony default export */ function __WEBPACK_DEFAULT_EXPORT__() {
+ var ref = _slicedToArray(
+ react__WEBPACK_IMPORTED_MODULE_1__.useState(0),
+ 2
+ ),
+ clicks1 = ref[0],
+ setClicks1 = ref[1];
+ var ref1 = (0, react__WEBPACK_IMPORTED_MODULE_1__.useState)(0),
+ clicks2 = ref1[0],
+ setClicks2 = ref1[1];
+ var doClick1 = react__WEBPACK_IMPORTED_MODULE_1__.useCallback(
function() {
setClicks1(clicks1 + 1);
},
[clicks1]
);
- var doClick2 = (0, react.useCallback)(
+ var doClick2 = (0, react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(
function() {
setClicks2(clicks2 + 1);
},
[clicks2]
);
- return /*#__PURE__*/ (0, jsx_runtime.jsxs)(jsx_runtime.Fragment, {
- children: [
- /*#__PURE__*/ (0, jsx_runtime.jsxs)("h3", {
- children: ["Clicks ", clicks1]
- }),
- /*#__PURE__*/ (0, jsx_runtime.jsx)("button", {
- onClick: doClick1,
- children: "Click me"
- }),
- /*#__PURE__*/ (0, jsx_runtime.jsxs)("h3", {
- children: ["Clicks ", clicks2]
- }),
- /*#__PURE__*/ (0, jsx_runtime.jsx)("button", {
- onClick: doClick2,
- children: "Click me"
- })
- ]
- });
- };
-
- /***/
- },
-
- /***/ 1470: /***/ function(
- __unused_webpack_module,
- __unused_webpack_exports,
- __webpack_require__
- ) {
- (window.__NEXT_P = window.__NEXT_P || []).push([
- "/hooks",
- function() {
- return __webpack_require__(4925);
- }
- ]);
+ return /*#__PURE__*/ (0,
+ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(
+ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment,
+ {
+ children: [
+ /*#__PURE__*/ (0,
+ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("h3", {
+ children: ["Clicks ", clicks1]
+ }),
+ /*#__PURE__*/ (0,
+ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("button", {
+ onClick: doClick1,
+ children: "Click me"
+ }),
+ /*#__PURE__*/ (0,
+ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("h3", {
+ children: ["Clicks ", clicks2]
+ }),
+ /*#__PURE__*/ (0,
+ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("button", {
+ onClick: doClick2,
+ children: "Click me"
+ })
+ ]
+ }
+ );
+ }
/***/
}
Diff for image-HASH.js
@@ -1,949 +1,22 @@
(self["webpackChunk_N_E"] = self["webpackChunk_N_E"] || []).push([
[358],
{
- /***/ 1504: /***/ function(
+ /***/ 2361: /***/ function(
__unused_webpack_module,
- exports,
+ __unused_webpack_exports,
__webpack_require__
) {
- "use strict";
- var __webpack_unused_export__;
-
- var _slicedToArray = __webpack_require__(3038);
-
- var _toConsumableArray = __webpack_require__(319);
-
- __webpack_unused_export__ = {
- value: true
- };
- exports["default"] = Image;
-
- var _react = _interopRequireDefault(__webpack_require__(7294));
-
- var _head = _interopRequireDefault(__webpack_require__(7006));
-
- var _toBase64 = __webpack_require__(4186);
-
- var _imageConfig = __webpack_require__(5809);
-
- var _useIntersection = __webpack_require__(3418);
-
- 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;
- }
-
- function _interopRequireDefault(obj) {
- return obj && obj.__esModule
- ? obj
- : {
- default: obj
- };
- }
-
- function _objectSpread(target) {
- for (var i = 1; i < arguments.length; i++) {
- var source = arguments[i] != null ? arguments[i] : {};
- var ownKeys = Object.keys(source);
-
- if (typeof Object.getOwnPropertySymbols === "function") {
- ownKeys = ownKeys.concat(
- Object.getOwnPropertySymbols(source).filter(function(sym) {
- return Object.getOwnPropertyDescriptor(source, sym).enumerable;
- })
- );
-
Post job cleanup.
[command]/usr/bin/git version
git version 2.33.0
[command]/usr/bin/git config --local --name-only --get-regexp core\.sshCommand
[command]/usr/bin/git submodule foreach --recursive git config --local --name-only --get-regexp 'core\.sshCommand' && git config --local --unset-all 'core.sshCommand' || :
[command]/usr/bin/git config --local --name-only --get-regexp http\.https\:\/\/github\.com\/\.extraheader
http.https://github.com/.extraheader
[command]/usr/bin/git config --local --unset-all http.https://github.com/.extraheader
[command]/usr/bin/git submodule foreach --recursive git config --local --name-only --get-regexp 'http\.https\:\/\/github\.com\/\.extraheader' && git config --local --unset-all 'http.https://github.com/.extraheader' || :
Cleaning up orphan processes
Commit: dda7019b9d3bcc771e6cc4b94ddb2817b196a256
Ported from #29185 These are all related to `swcLoader`: - Fixes commonjs code being output as ESM - Fixes bug with `getServerSideProps` not getting querystrings and added tests for it - Disable SWC on Babel test suites - Disable SWC on no-anon-default-export test suite - Disable SWC on page-config test suite (pending porting of the Babel plugin) - Ensure `sourcesContent` is part of the sourcemap ## Bug - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Errors have helpful link attached, see `contributing.md` ## Feature - [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR. - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Documentation added - [ ] Telemetry added. In case of a feature if it's used or not. - [ ] Errors have helpful link attached, see `contributing.md` ## Documentation / Examples - [ ] Make sure the linting passes
Follow up in #29811 |
DO NOT MERGE
running full test suite with swcLoader
Bug
fixes #number
contributing.md
Feature
fixes #number
contributing.md
Documentation / Examples