-
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 SWC by default when there is no custom Babel config #29811
Enable SWC by default when there is no custom Babel config #29811
Conversation
…xt.js into add/test-enable-swcloader
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.
…xt.js into add/test-enable-swcloader
Stats from current PRDefault Build (Decrease detected ✓)General Overall increase
|
vercel/next.js canary | timneutkens/next.js add/test-enable-swcloader | Change | |
---|---|---|---|
buildDuration | 14s | 10.2s | -3.8s |
buildDurationCached | 3.2s | 3.2s | -17ms |
nodeModulesSize | 196 MB | 196 MB |
Page Load Tests Overall decrease ⚠️
vercel/next.js canary | timneutkens/next.js add/test-enable-swcloader | Change | |
---|---|---|---|
/ failed reqs | 0 | 0 | ✓ |
/ total time (seconds) | 3.226 | 3.275 | |
/ avg req/sec | 774.99 | 763.29 | |
/error-in-render failed reqs | 0 | 0 | ✓ |
/error-in-render total time (seconds) | 1.598 | 1.774 | |
/error-in-render avg req/sec | 1564.67 | 1409.57 |
Client Bundles (main, webpack, commons) Overall decrease ✓
vercel/next.js canary | timneutkens/next.js add/test-enable-swcloader | Change | |
---|---|---|---|
651.cd440d20..0b23.js gzip | 2.96 kB | N/A | N/A |
831.695e33f6..205f.js gzip | 179 B | 179 B | ✓ |
framework-89..a097.js gzip | 42.2 kB | 42.2 kB | ✓ |
main-dcb1764..4cad.js gzip | 26.1 kB | N/A | N/A |
webpack-f09b..493e.js gzip | 1.47 kB | 1.45 kB | -29 B |
main-6970aaf..0f69.js gzip | N/A | 27.7 kB | N/A |
Overall change | 72.9 kB | 71.5 kB | -1.39 kB |
Legacy Client Bundles (polyfills)
vercel/next.js canary | timneutkens/next.js add/test-enable-swcloader | Change | |
---|---|---|---|
polyfills-a4..dd70.js gzip | 31 kB | 31 kB | ✓ |
Overall change | 31 kB | 31 kB | ✓ |
Client Pages Overall decrease ✓
vercel/next.js canary | timneutkens/next.js add/test-enable-swcloader | Change | |
---|---|---|---|
_app-9fb8765..c13d.js gzip | 979 B | N/A | N/A |
_error-d828d..2954.js gzip | 3.06 kB | N/A | N/A |
amp-5388d1f5..4ce9.js gzip | 551 B | N/A | N/A |
css-10424225..367a.js gzip | 329 B | 327 B | -2 B |
dynamic-9821..3cd4.js gzip | 2.67 kB | N/A | N/A |
head-1df323b..d261.js gzip | 2.32 kB | N/A | N/A |
hooks-ab0016..b093.js gzip | 917 B | N/A | N/A |
image-acc140..4699.js gzip | 5.86 kB | N/A | N/A |
index-95c8cb..6970.js gzip | 260 B | 263 B | |
link-05c99e7..35ec.js gzip | 1.66 kB | N/A | N/A |
routerDirect..6659.js gzip | 319 B | 321 B | |
script-d94ba..ed05.js gzip | 386 B | 383 B | -3 B |
withRouter-7..8b2e.js gzip | 317 B | 318 B | |
9a34b27eb3f9..27d.css gzip | 125 B | 125 B | ✓ |
_app-e2cfdd4..f20e.js gzip | N/A | 1.23 kB | N/A |
_error-6679c..c50e.js gzip | N/A | 194 B | N/A |
amp-e55eb6be..a860.js gzip | N/A | 312 B | N/A |
dynamic-3814..830e.js gzip | N/A | 2.38 kB | N/A |
head-0b292cc..7d7c.js gzip | N/A | 350 B | N/A |
hooks-a534e8..efa1.js gzip | N/A | 635 B | N/A |
image-07bccd..d945.js gzip | N/A | 4.44 kB | N/A |
link-a8a0a12..1f88.js gzip | N/A | 1.87 kB | N/A |
Overall change | 19.8 kB | 13.2 kB | -6.61 kB |
Client Build Manifests
vercel/next.js canary | timneutkens/next.js add/test-enable-swcloader | Change | |
---|---|---|---|
_buildManifest.js gzip | 459 B | 459 B | ✓ |
Overall change | 459 B | 459 B | ✓ |
Rendered Page Sizes Overall decrease ✓
vercel/next.js canary | timneutkens/next.js add/test-enable-swcloader | Change | |
---|---|---|---|
index.html gzip | 536 B | 535 B | -1 B |
link.html gzip | 548 B | 548 B | ✓ |
withRouter.html gzip | 528 B | 528 B | ✓ |
Overall change | 1.61 kB | 1.61 kB | -1 B |
Diffs
Diff for _buildManifest.js
@@ -1,25 +1,25 @@
self.__BUILD_MANIFEST = {
__rewrites: { beforeFiles: [], afterFiles: [], fallback: [] },
- "/": ["static\u002Fchunks\u002Fpages\u002Findex-843adaf946d87644.js"],
- "/_error": ["static\u002Fchunks\u002Fpages\u002F_error-c781952f352e4219.js"],
- "/amp": ["static\u002Fchunks\u002Fpages\u002Famp-b11421da95e6cd65.js"],
+ "/": ["static\u002Fchunks\u002Fpages\u002Findex-22405fb865808942.js"],
+ "/_error": ["static\u002Fchunks\u002Fpages\u002F_error-97db2c91e74bb63f.js"],
+ "/amp": ["static\u002Fchunks\u002Fpages\u002Famp-8c7b17a56b7abb6e.js"],
"/css": [
"static\u002Fcss\u002Fb05d9375ec06fe1b.css",
- "static\u002Fchunks\u002Fpages\u002Fcss-3082f38ec4aa6063.js"
+ "static\u002Fchunks\u002Fpages\u002Fcss-99ad492aad2c14e4.js"
],
"/dynamic": [
- "static\u002Fchunks\u002Fpages\u002Fdynamic-e9949e65f81038fb.js"
+ "static\u002Fchunks\u002Fpages\u002Fdynamic-0ead1841ed0002db.js"
],
- "/head": ["static\u002Fchunks\u002Fpages\u002Fhead-a9a93d991a2a6a9c.js"],
- "/hooks": ["static\u002Fchunks\u002Fpages\u002Fhooks-e040764724fe6a41.js"],
- "/image": ["static\u002Fchunks\u002Fpages\u002Fimage-720ac9f15add6d61.js"],
- "/link": ["static\u002Fchunks\u002Fpages\u002Flink-f632234727179322.js"],
+ "/head": ["static\u002Fchunks\u002Fpages\u002Fhead-7100d3b2a548f0e4.js"],
+ "/hooks": ["static\u002Fchunks\u002Fpages\u002Fhooks-ff60bc61acd2698b.js"],
+ "/image": ["static\u002Fchunks\u002Fpages\u002Fimage-c60c37af3228a150.js"],
+ "/link": ["static\u002Fchunks\u002Fpages\u002Flink-977f59da15f34551.js"],
"/routerDirect": [
- "static\u002Fchunks\u002Fpages\u002FrouterDirect-df7921033b292f8a.js"
+ "static\u002Fchunks\u002Fpages\u002FrouterDirect-76232dd6bc335a24.js"
],
- "/script": ["static\u002Fchunks\u002Fpages\u002Fscript-c65470edc1e9d9b6.js"],
+ "/script": ["static\u002Fchunks\u002Fpages\u002Fscript-52713a82413f16bb.js"],
"/withRouter": [
- "static\u002Fchunks\u002Fpages\u002FwithRouter-070ef9975918e033.js"
+ "static\u002Fchunks\u002Fpages\u002FwithRouter-50f69b5840cc7abf.js"
],
sortedPages: [
"\u002F",
Diff for _app-3ab6a24eae9d4d66.js
deleted
Diff for _app-de3f211ea2b76ae1.js
@@ -0,0 +1,268 @@
+(self["webpackChunk_N_E"] = self["webpackChunk_N_E"] || []).push([
+ [888],
+ {
+ /***/ 915: /***/ function(
+ __unused_webpack_module,
+ __unused_webpack_exports,
+ __webpack_require__
+ ) {
+ (window.__NEXT_P = window.__NEXT_P || []).push([
+ "/_app",
+ function() {
+ return __webpack_require__(6029);
+ }
+ ]);
+ if (false) {
+ }
+
+ /***/
+ },
+
+ /***/ 6029: /***/ function(
+ __unused_webpack_module,
+ exports,
+ __webpack_require__
+ ) {
+ "use strict";
+
+ var _regeneratorRuntime = _interopRequireDefault(
+ __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 _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"
+ );
+ }
+ subClass.prototype = Object.create(superClass && superClass.prototype, {
+ constructor: {
+ value: subClass,
+ writable: true,
+ configurable: true
+ }
+ });
+ if (superClass) _setPrototypeOf(subClass, superClass);
+ }
+ function _interopRequireDefault(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
+ });
+ Object.defineProperty(exports, "AppInitialProps", {
+ enumerable: true,
+ get: function get() {
+ return _utils.AppInitialProps;
+ }
+ });
+ Object.defineProperty(exports, "NextWebVitalsMetric", {
+ enumerable: true,
+ get: function get() {
+ return _utils.NextWebVitalsMetric;
+ }
+ });
+ exports["default"] = void 0;
+ var _react = _interopRequireDefault1(__webpack_require__(7294));
+ var _utils = __webpack_require__(3794);
+ function asyncGeneratorStep(
+ gen,
+ resolve,
+ reject,
+ _next,
+ _throw,
+ key,
+ arg
+ ) {
+ try {
+ var info = gen[key](arg);
+ var value = info.value;
+ } catch (error) {
+ 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,
+ resolve,
+ reject,
+ _next,
+ _throw,
+ "next",
+ value
+ );
+ }
+ function _throw(err) {
+ asyncGeneratorStep(
+ gen,
+ resolve,
+ reject,
+ _next,
+ _throw,
+ "throw",
+ err
+ );
+ }
+ _next(undefined);
+ });
+ };
+ }
+ function _interopRequireDefault1(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(
+ _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);
+ })
+ );
+ return _appGetInitialProps.apply(this, arguments);
+ }
+ function appGetInitialProps(_) {
+ return _appGetInitialProps.apply(this, arguments);
+ }
+ var App = /*#__PURE__*/ (function(_Component) {
+ _inherits(App, _Component);
+ function App() {
+ _classCallCheck(this, App);
+ return _possibleConstructorReturn(
+ this,
+ _getPrototypeOf(App).apply(this, arguments)
+ );
+ }
+ _createClass(App, [
+ {
+ key: "render",
+ value: function render() {
+ var _props = this.props,
+ Component = _props.Component,
+ pageProps = _props.pageProps;
+ return /*#__PURE__*/ _react.default.createElement(
+ Component,
+ Object.assign({}, pageProps)
+ );
+ }
+ }
+ ]);
+ return App;
+ })(_react.default.Component);
+ App.origGetInitialProps = appGetInitialProps;
+ App.getInitialProps = appGetInitialProps;
+ exports["default"] = App; //# sourceMappingURL=_app.js.map
+
+ /***/
+ }
+ },
+ /******/ function(__webpack_require__) {
+ // webpackRuntimeModules
+ /******/ var __webpack_exec__ = function(moduleId) {
+ return __webpack_require__((__webpack_require__.s = moduleId));
+ };
+ /******/ __webpack_require__.O(0, [774, 179], function() {
+ return __webpack_exec__(915), __webpack_exec__(387);
+ });
+ /******/ var __webpack_exports__ = __webpack_require__.O();
+ /******/ _N_E = __webpack_exports__;
+ /******/
+ }
+]);
Diff for _error-97db2..1e74bb63f.js
@@ -0,0 +1,33 @@
+(self["webpackChunk_N_E"] = self["webpackChunk_N_E"] || []).push([
+ [820],
+ {
+ /***/ 4977: /***/ function(
+ __unused_webpack_module,
+ __unused_webpack_exports,
+ __webpack_require__
+ ) {
+ (window.__NEXT_P = window.__NEXT_P || []).push([
+ "/_error",
+ function() {
+ return __webpack_require__(9185);
+ }
+ ]);
+ if (false) {
+ }
+
+ /***/
+ }
+ },
+ /******/ function(__webpack_require__) {
+ // webpackRuntimeModules
+ /******/ var __webpack_exec__ = function(moduleId) {
+ return __webpack_require__((__webpack_require__.s = moduleId));
+ };
+ /******/ __webpack_require__.O(0, [888, 774, 179], function() {
+ return __webpack_exec__(4977);
+ });
+ /******/ var __webpack_exports__ = __webpack_require__.O();
+ /******/ _N_E = __webpack_exports__;
+ /******/
+ }
+]);
Diff for _error-c7819..f352e4219.js
deleted
Diff for amp-8c7b17a56b7abb6e.js
@@ -0,0 +1,75 @@
+(self["webpackChunk_N_E"] = self["webpackChunk_N_E"] || []).push([
+ [216],
+ {
+ /***/ 9135: /***/ function(
+ module,
+ __unused_webpack_exports,
+ __webpack_require__
+ ) {
+ module.exports = __webpack_require__(3240);
+
+ /***/
+ },
+
+ /***/ 6071: /***/ function(
+ __unused_webpack_module,
+ __unused_webpack_exports,
+ __webpack_require__
+ ) {
+ (window.__NEXT_P = window.__NEXT_P || []).push([
+ "/amp",
+ function() {
+ return __webpack_require__(1910);
+ }
+ ]);
+ if (false) {
+ }
+
+ /***/
+ },
+
+ /***/ 1910: /***/ function(
+ __unused_webpack_module,
+ __webpack_exports__,
+ __webpack_require__
+ ) {
+ "use strict";
+ __webpack_require__.r(__webpack_exports__);
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
+ /* harmony export */ config: function() {
+ return /* binding */ config;
+ },
+ /* harmony export */ default: function() {
+ return /* binding */ Amp;
+ }
+ /* harmony export */
+ });
+ /* harmony import */ var next_amp__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
+ 9135
+ );
+
+ var config = {
+ amp: "hybrid"
+ };
+ function Amp(props) {
+ return (0, next_amp__WEBPACK_IMPORTED_MODULE_0__.useAmp)()
+ ? "AMP mode"
+ : "normal mode";
+ }
+
+ /***/
+ }
+ },
+ /******/ function(__webpack_require__) {
+ // webpackRuntimeModules
+ /******/ var __webpack_exec__ = function(moduleId) {
+ return __webpack_require__((__webpack_require__.s = moduleId));
+ };
+ /******/ __webpack_require__.O(0, [888, 774, 179], function() {
+ return __webpack_exec__(6071);
+ });
+ /******/ var __webpack_exports__ = __webpack_require__.O();
+ /******/ _N_E = __webpack_exports__;
+ /******/
+ }
+]);
Diff for amp-b11421da95e6cd65.js
deleted
Diff for css-3082f38ec4aa6063.js
@@ -1,54 +1,53 @@
(self["webpackChunk_N_E"] = self["webpackChunk_N_E"] || []).push([
[706],
{
- /***/ 6264: /***/ function(
+ /***/ 7083: /***/ function(
+ __unused_webpack_module,
+ __unused_webpack_exports,
+ __webpack_require__
+ ) {
+ (window.__NEXT_P = window.__NEXT_P || []).push([
+ "/css",
+ function() {
+ return __webpack_require__(5089);
+ }
+ ]);
+ if (false) {
+ }
+
+ /***/
+ },
+
+ /***/ 5089: /***/ 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__(
3350
);
/* 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__(6264);
- }
- ]);
- if (false) {
- }
-
- /***/
- },
-
/***/ 3350: /***/ function(module) {
// extracted by mini-css-extract-plugin
module.exports = { helloWorld: "css_helloWorld__2Fhmt" };
Diff for dynamic-e994..5f81038fb.js
@@ -1,7 +1,24 @@
(self["webpackChunk_N_E"] = self["webpackChunk_N_E"] || []).push([
[739],
{
- /***/ 3579: /***/ function(
+ /***/ 1893: /***/ function(
+ __unused_webpack_module,
+ __unused_webpack_exports,
+ __webpack_require__
+ ) {
+ (window.__NEXT_P = window.__NEXT_P || []).push([
+ "/dynamic",
+ function() {
+ return __webpack_require__(3286);
+ }
+ ]);
+ if (false) {
+ }
+
+ /***/
+ },
+
+ /***/ 638: /***/ function(
__unused_webpack_module,
exports,
__webpack_require__
@@ -9,57 +26,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__(3668));
-
+ var _loadable = _interopRequireDefault(__webpack_require__(4302));
function _interopRequireDefault(obj) {
return obj && obj.__esModule
? obj
@@ -67,22 +81,19 @@
default: obj
};
}
-
- var isServerSide = false;
-
+ var isServerSide = "object" === "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 +101,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 +142,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
/***/
},
- /***/ 3982: /***/ function(
+ /***/ 6319: /***/ function(
__unused_webpack_module,
exports,
__webpack_require__
@@ -178,9 +179,7 @@
value: true
});
exports.LoadableContext = void 0;
-
var _react = _interopRequireDefault(__webpack_require__(7294));
-
function _interopRequireDefault(obj) {
return obj && obj.__esModule
? obj
@@ -188,156 +187,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
/***/
},
- /***/ 3668: /***/ function(
+ /***/ 4302: /***/ 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__(3982);
-
+ var _loadableContext = __webpack_require__(6319);
function _interopRequireDefault(obj) {
return obj && obj.__esModule
? obj
@@ -345,11 +265,9 @@
default: obj
};
}
-
var ALL_INITIALIZERS = [];
var READY_INITIALIZERS = [];
var initialized = false;
-
function load(loader) {
var promise = loader();
var state = {
@@ -363,39 +281,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 +302,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 +319,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 +335,7 @@
retry: subscription.retry
});
} else if (state.loaded) {
- return _react["default"].createElement(
+ return _react.default.createElement(
resolve(state.loaded),
props
);
@@ -486,35 +345,84 @@
},
[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 (false) {
+ }
+ // Client only
+ if (
+ !initialized &&
+ "object" !== "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 +430,6 @@
this._timeout = null;
this.retry();
}
-
_createClass(LoadableSubscription, [
{
key: "promise",
@@ -533,52 +440,48 @@
{
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 _this2 = this;
this._delay = setTimeout(function() {
- _this._update({
+ _this2._update({
pastDelay: true
});
}, opts.delay);
}
}
-
if (typeof opts.timeout === "number") {
+ var _this3 = this;
this._timeout = setTimeout(function() {
- _this._update({
+ _this3._update({
timedOut: true
});
}, 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 +489,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 +498,6 @@
},
partial
);
-
this._callbacks.forEach(function(callback) {
return callback();
});
@@ -617,71 +519,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) {
window.__NEXT_PRELOADREADY = Loadable.preloadReady;
}
-
var _default = Loadable;
- exports["default"] = _default;
+ exports["default"] = _default; //# sourceMappingURL=loadable.js.map
/***/
},
- /***/ 7501: /***/ function(
+ /***/ 3286: /***/ function(
__unused_webpack_module,
__webpack_exports__,
__webpack_require__
@@ -694,80 +582,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() */ 831)
- .then(__webpack_require__.bind(__webpack_require__, 2831));
+ .e(/* import() */ 450)
+ .then(__webpack_require__.bind(__webpack_require__, 6450));
},
{
loadableGenerated: {
- webpack: function webpack() {
- return [/*require.resolve*/ 2831];
+ webpack: function() {
+ return [/*require.resolve*/ 6450];
},
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__(7501);
- }
- ]);
- if (false) {
- }
-
- /***/
- },
-
/***/ 5152: /***/ function(
module,
__unused_webpack_exports,
__webpack_require__
) {
- module.exports = __webpack_require__(3579);
+ module.exports = __webpack_require__(638);
/***/
}
Diff for head-7100d3b2a548f0e4.js
@@ -0,0 +1,93 @@
+(self["webpackChunk_N_E"] = self["webpackChunk_N_E"] || []).push([
+ [645],
+ {
+ /***/ 4251: /***/ function(
+ __unused_webpack_module,
+ __unused_webpack_exports,
+ __webpack_require__
+ ) {
+ (window.__NEXT_P = window.__NEXT_P || []).push([
+ "/head",
+ function() {
+ return __webpack_require__(5423);
+ }
+ ]);
+ if (false) {
+ }
+
+ /***/
+ },
+
+ /***/ 5423: /***/ function(
+ __unused_webpack_module,
+ __webpack_exports__,
+ __webpack_require__
+ ) {
+ "use strict";
+ __webpack_require__.r(__webpack_exports__);
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
+ /* harmony export */ __N_SSP: function() {
+ return /* binding */ __N_SSP;
+ }
+ /* harmony export */
+ });
+ /* 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() {
+ /*#__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_0__.jsx)(
+ next_head__WEBPACK_IMPORTED_MODULE_1__["default"],
+ {
+ children: /*#__PURE__*/ (0,
+ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("title", {
+ children: "hello world"
+ })
+ }
+ ),
+ /*#__PURE__*/ (0,
+ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("p", {
+ children: "testing next/head size"
+ })
+ ]
+ }
+ );
+ };
+ var __N_SSP = true;
+ /* harmony default export */ __webpack_exports__["default"] = Page;
+
+ /***/
+ },
+
+ /***/ 9008: /***/ function(
+ module,
+ __unused_webpack_exports,
+ __webpack_require__
+ ) {
+ module.exports = __webpack_require__(5443);
+
+ /***/
+ }
+ },
+ /******/ function(__webpack_require__) {
+ // webpackRuntimeModules
+ /******/ var __webpack_exec__ = function(moduleId) {
+ return __webpack_require__((__webpack_require__.s = moduleId));
+ };
+ /******/ __webpack_require__.O(0, [774, 888, 179], function() {
+ return __webpack_exec__(4251);
+ });
+ /******/ var __webpack_exports__ = __webpack_require__.O();
+ /******/ _N_E = __webpack_exports__;
+ /******/
+ }
+]);
Diff for head-a9a93d991a2a6a9c.js
deleted
Diff for hooks-e04076..724fe6a41.js
deleted
Diff for hooks-ff60bc..1acd2698b.js
@@ -0,0 +1,147 @@
+(self["webpackChunk_N_E"] = self["webpackChunk_N_E"] || []).push([
+ [757],
+ {
+ /***/ 1470: /***/ function(
+ __unused_webpack_module,
+ __unused_webpack_exports,
+ __webpack_require__
+ ) {
+ (window.__NEXT_P = window.__NEXT_P || []).push([
+ "/hooks",
+ function() {
+ return __webpack_require__(5017);
+ }
+ ]);
+ if (false) {
+ }
+
+ /***/
+ },
+
+ /***/ 5017: /***/ function(
+ __unused_webpack_module,
+ __webpack_exports__,
+ __webpack_require__
+ ) {
+ "use strict";
+ __webpack_require__.r(__webpack_exports__);
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
+ /* harmony export */ default: function() {
+ return /* export default binding */ __WEBPACK_DEFAULT_EXPORT__;
+ }
+ /* 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;
+ }
+ function _iterableToArrayLimit(arr, i) {
+ var _arr = [];
+ var _n = true;
+ var _d = false;
+ var _e = undefined;
+ try {
+ 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) {
+ _d = true;
+ _e = err;
+ } finally {
+ try {
+ if (!_n && _i["return"] != null) _i["return"]();
+ } finally {
+ if (_d) throw _e;
+ }
+ }
+ return _arr;
+ }
+ function _nonIterableRest() {
+ throw new TypeError(
+ "Invalid attempt to destructure non-iterable instance"
+ );
+ }
+ function _slicedToArray(arr, i) {
+ return (
+ _arrayWithHoles(arr) ||
+ _iterableToArrayLimit(arr, i) ||
+ _nonIterableRest()
+ );
+ }
+ /* 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__WEBPACK_IMPORTED_MODULE_1__.useCallback)(
+ function() {
+ setClicks2(clicks2 + 1);
+ },
+ [clicks2]
+ );
+ 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"
+ })
+ ]
+ }
+ );
+ }
+
+ /***/
+ }
+ },
+ /******/ function(__webpack_require__) {
+ // webpackRuntimeModules
+ /******/ var __webpack_exec__ = function(moduleId) {
+ return __webpack_require__((__webpack_require__.s = moduleId));
+ };
+ /******/ __webpack_require__.O(0, [774, 888, 179], function() {
+ return __webpack_exec__(1470);
+ });
+ /******/ var __webpack_exports__ = __webpack_require__.O();
+ /******/ _N_E = __webpack_exports__;
+ /******/
+ }
+]);
Diff for image-720ac9..15add6d61.js
Diff too large to display
Diff for index-843ada..946d87644.js
@@ -1,7 +1,24 @@
(self["webpackChunk_N_E"] = self["webpackChunk_N_E"] || []).push([
[405],
{
- /***/ 2748: /***/ function(
+ /***/ 8581: /***/ function(
+ __unused_webpack_module,
+ __unused_webpack_exports,
+ __webpack_require__
+ ) {
+ (window.__NEXT_P = window.__NEXT_P || []).push([
+ "/",
+ function() {
+ return __webpack_require__(3678);
+ }
+ ]);
+ if (false) {
+ }
+
+ /***/
+ },
+
+ /***/ 3678: /***/ function(
__unused_webpack_module,
__webpack_exports__,
__webpack_require__
@@ -14,31 +31,12 @@
}
/* harmony export */
});
- var Page = function Page() {
+ var Page = function() {
return "Hello world 👋";
- }; // 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;
- /***/
- },
-
- /***/ 8581: /***/ function(
- __unused_webpack_module,
- __unused_webpack_exports,
- __webpack_require__
- ) {
- (window.__NEXT_P = window.__NEXT_P || []).push([
- "/",
- function() {
- return __webpack_require__(2748);
- }
- ]);
- if (false) {
- }
-
/***/
}
},
Diff for link-f632234727179322.js
@@ -1,7 +1,24 @@
(self["webpackChunk_N_E"] = self["webpackChunk_N_E"] || []).push([
[644],
{
- /***/ 7942: /***/ function(
+ /***/ 7847: /***/ function(
+ __unused_webpack_module,
+ __unused_webpack_exports,
+ __webpack_require__
+ ) {
+ (window.__NEXT_P = window.__NEXT_P || []).push([
+ "/link",
+ function() {
+ return __webpack_require__(4380);
+ }
+ ]);
+ if (false) {
+ }
+
+ /***/
+ },
+
+ /***/ 8418: /***/ function(
__unused_webpack_module,
exports,
__webpack_require__
@@ -9,21 +26,62 @@
"use strict";
var __webpack_unused_export__;
- var _slicedToArray = __webpack_require__(3038);
-
+ function _arrayWithHoles(arr) {
+ if (Array.isArray(arr)) return arr;
+ }
+ function _iterableToArrayLimit(arr, i) {
+ var _arr = [];
+ var _n = true;
+ var _d = false;
+ var _e = undefined;
+ try {
+ 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) {
+ _d = true;
+ _e = err;
+ } finally {
+ try {
+ if (!_n && _i["return"] != null) _i["return"]();
+ } finally {
+ if (_d) throw _e;
+ }
+ }
+ return _arr;
+ }
+ function _nonIterableRest() {
+ throw new TypeError(
+ "Invalid attempt to destructure non-iterable instance"
+ );
+ }
+ function _slicedToArray(arr, i) {
+ return (
+ _arrayWithHoles(arr) ||
+ _iterableToArrayLimit(arr, i) ||
+ _nonIterableRest()
+ );
+ }
+ var _typeof = function(obj) {
+ return obj &&
+ typeof Symbol !== "undefined" &&
+ obj.constructor === Symbol
+ ? "symbol"
+ : typeof obj;
+ };
__webpack_unused_export__ = {
value: true
};
exports["default"] = void 0;
-
var _react = _interopRequireDefault(__webpack_require__(7294));
-
- var _router = __webpack_require__(4957);
-
- var _router1 = __webpack_require__(9898);
-
- var _useIntersection = __webpack_require__(639);
-
+ var _router = __webpack_require__(6273);
+ var _router1 = __webpack_require__(387);
+ var _useIntersection = __webpack_require__(7190);
function _interopRequireDefault(obj) {
return obj && obj.__esModule
? obj
@@ -31,30 +89,28 @@
default: obj
};
}
-
var prefetched = {};
-
function prefetch(router, href, as, options) {
if (false || !router) return;
- if (!(0, _router).isLocalURL(href)) return; // Prefetch the JSON page if asked (only in the client)
+ if (!(0, _router).isLocalURL(href)) return;
+ // Prefetch the JSON page if asked (only in the client)
// We need to handle a prefetch error here since we may be
// loading with priority which can reject but we don't
// want to force navigation since this is only a prefetch
-
- router.prefetch(href, as, options)["catch"](function(err) {
+ router.prefetch(href, as, options).catch(function(err) {
if (false) {
}
});
var curLocale =
options && typeof options.locale !== "undefined"
? options.locale
- : router && router.locale; // Join on an invalid URI character
-
+ : router && router.locale;
+ // Join on an invalid URI character
prefetched[href + "%" + as + (curLocale ? "%" + curLocale : "")] = true;
}
-
function isModifiedEvent(event) {
- var target = event.currentTarget.target;
+ var _currentTarget = event.currentTarget,
+ target = _currentTarget.target;
return (
(target && targe
Post job cleanup.
[command]/usr/bin/git version
git version 2.33.1
[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: bcc2a3bf48fc06f63c8b05648367b5215e7c638c
Failing test suitesCommit: bcc2a3b test/development/basic-basepath/hmr.test.ts
Expand output● basic HMR › Error Recovery › should detect runtime errors on the module scope
● basic HMR › Error Recovery › should recover from errors in the render function
● basic HMR › Error Recovery › should recover after exporting an invalid page
● basic HMR › Error Recovery › should recover after undefined exported as default
● basic HMR › Error Recovery › should recover after an error reported via SSR
|
Enables
next-swc-loader
by default which leveragesnext-swc
to compile individual JavaScript and TypeScript files. Opt-out is automatic when custom Babel configuration is found, it will fall back to the existing Babel setup so there's no difference there when you have a custom Babel configuration (fully backwards compatible).next-swc
is a custom compiled version of SWC that is built based on the Rust crates for SWC. It includes Next.js-specific transforms like styled-jsx and tree shaking of data fetching methods that allow you to use server-only dependencies ingetStaticProps
/getServerSideProps
.The last transform for AMP support is currently being ported by @padmaia(Complete)Bug
fixes #number
contributing.md
Feature
fixes #number
contributing.md
Documentation / Examples