-
Notifications
You must be signed in to change notification settings - Fork 26.8k
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
Debug CircleCi #8191
Closed
Closed
Debug CircleCi #8191
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Stats from current PRClick to expand stats
|
zeit/next.js canary | ijjk/next.js debug-circle | Change | |
---|---|---|---|
Build Duration | 13.2s | 13.1s | -32ms |
node_modules Size |
45.9 MB | 45.9 MB | |
Total Bundle (main, webpack, commons) Size | 206 kB | 206 kB | |
Total Bundle (main, webpack, commons) gzip Size | 67.8 kB | 67.9 kB | |
Client _app Size |
2.39 kB | 2.39 kB | ✓ |
Client _app gzip Size |
1.08 kB | 1.08 kB | ✓ |
Client _error Size |
8.22 kB | 8.22 kB | ✓ |
Client _error gzip Size |
3.16 kB | 3.16 kB | ✓ |
Client pages/index Size |
343 B | 343 B | ✓ |
Client pages/index gzip Size |
246 B | 246 B | ✓ |
Client pages/link Size |
4.08 kB | 4.08 kB | ✓ |
Client pages/link gzip Size |
1.8 kB | 1.8 kB | ✓ |
Client pages/routerDirect Size |
423 B | 423 B | ✓ |
Client pages/routerDirect gzip Size |
306 B | 306 B | ✓ |
Client pages/withRouter Size |
435 B | 435 B | ✓ |
Client pages/withRouter gzip Size |
301 B | 301 B | ✓ |
Client main Size |
15.4 kB | 15.6 kB | |
Client main gzip Size |
5.35 kB | 5.39 kB | |
Client commons Size |
188 kB | 188 kB | ✓ |
Client commons gzip Size |
61.1 kB | 61.1 kB | ✓ |
Client webpack Size |
1.49 kB | 1.49 kB | ✓ |
Client webpack gzip Size |
770 B | 770 B | ✓ |
Base Rendered Size | 1.35 kB | 1.35 kB | ✓ |
Build Dir Size | 702 kB | 703 kB |
Click to expand serverless stats ⚠️ Total Bundle Size Increase ⚠️
zeit/next.js canary | ijjk/next.js debug-circle | Change | |
---|---|---|---|
Build Duration | 14.1s | 14.5s | |
node_modules Size |
45.9 MB | 45.9 MB | |
Total Bundle (main, webpack, commons) Size | 206 kB | 206 kB | |
Total Bundle (main, webpack, commons) gzip Size | 67.8 kB | 67.9 kB | |
Client _app Size |
2.39 kB | 2.39 kB | ✓ |
Client _app gzip Size |
1.08 kB | 1.08 kB | ✓ |
Client _error Size |
8.22 kB | 8.22 kB | ✓ |
Client _error gzip Size |
3.16 kB | 3.16 kB | ✓ |
Client pages/index Size |
343 B | 343 B | ✓ |
Client pages/index gzip Size |
246 B | 246 B | ✓ |
Client pages/link Size |
4.08 kB | 4.08 kB | ✓ |
Client pages/link gzip Size |
1.8 kB | 1.8 kB | ✓ |
Client pages/routerDirect Size |
423 B | 423 B | ✓ |
Client pages/routerDirect gzip Size |
306 B | 306 B | ✓ |
Client pages/withRouter Size |
435 B | 435 B | ✓ |
Client pages/withRouter gzip Size |
301 B | 301 B | ✓ |
Client main Size |
15.4 kB | 15.6 kB | |
Client main gzip Size |
5.35 kB | 5.39 kB | |
Client commons Size |
188 kB | 188 kB | ✓ |
Client commons gzip Size |
61.1 kB | 61.1 kB | ✓ |
Client webpack Size |
1.49 kB | 1.49 kB | ✓ |
Client webpack gzip Size |
770 B | 770 B | ✓ |
Serverless pages/link Size |
252 kB | 252 kB | ✓ |
Serverless pages/link gzip Size |
67.9 kB | 67.9 kB | -3 B |
Serverless pages/index Size |
244 kB | 244 kB | ✓ |
Serverless pages/index gzip Size |
65.8 kB | 65.8 kB | -1 B |
Serverless pages/_error Size |
244 kB | 244 kB | ✓ |
Serverless pages/_error gzip Size |
65.5 kB | 65.5 kB | -2 B |
Serverless pages/routerDirect Size |
245 kB | 245 kB | ✓ |
Serverless pages/routerDirect gzip Size |
65.7 kB | 65.7 kB | -3 B |
Serverless pages/withRouter Size |
245 kB | 245 kB | ✓ |
Serverless pages/withRouter gzip Size |
65.9 kB | 65.8 kB | -2 B |
Build Dir Size | 1.89 MB | 1.89 MB |
Diff for main.js
@@ -1103,26 +1103,22 @@ var _mitt = _interopRequireDefault(__webpack_require__("kiME"));
var _unfetch = _interopRequireDefault(__webpack_require__("m/Gl"));
/* global document */
+// smaller version of https://gist.github.com/igrigorik/a02f2359f3bc50ca7a9c
-function supportsPreload(el) {
+function supportsPreload(list) {
+ if (!list || !list.supports) {
+ return false;
+ }
+
try {
- return el.relList.supports('preload');
- } catch (_unused) {
+ return list.supports('preload');
+ } catch (e) {
return false;
}
}
-var hasPreload = supportsPreload(document.createElement('link'));
-
-function preloadScript(url) {
- var link = document.createElement('link');
- link.rel = 'preload';
- link.crossOrigin = undefined;
- link.href = url;
- link.as = 'script';
- document.head.appendChild(link);
-}
+var hasPreload = supportsPreload(document.createElement('link').relList);
var PageLoader =
/*#__PURE__*/
@@ -1313,7 +1309,7 @@ function () {
return (0, _asyncToGenerator2["default"])(
/*#__PURE__*/
_regenerator["default"].mark(function _callee2() {
- var scriptRoute, cn;
+ var scriptRoute, link;
return _regenerator["default"].wrap(function _callee2$(_context2) {
while (1) {
switch (_context2.prev = _context2.next) {
@@ -1332,14 +1328,15 @@ function () {
case 5:
_this2.prefetchCache.add(scriptRoute); // Inspired by quicklink, license: https://github.com/GoogleChromeLabs/quicklink/blob/master/LICENSE
+ // Don't prefetch if the user is on 2G / Don't prefetch if Save-Data is enabled
- if (!(cn = navigator.connection)) {
+ if (!('connection' in navigator)) {
_context2.next = 9;
break;
}
- if (!((cn.effectiveType || '').indexOf('2g') !== -1 || cn.saveData)) {
+ if (!((navigator.connection.effectiveType || '').indexOf('2g') !== -1 || navigator.connection.saveData)) {
_context2.next = 9;
break;
}
@@ -1348,7 +1345,7 @@ function () {
case 9:
if (!hasPreload) {
- _context2.next = 14;
+ _context2.next = 19;
break;
}
@@ -1356,18 +1353,23 @@ function () {
return _this2.promisedBuildId;
case 12:
- preloadScript(_this2.assetPrefix + "/_next/static/" + encodeURIComponent(_this2.buildId) + "/pages" + scriptRoute);
+ link = document.createElement('link');
+ link.rel = 'preload';
+ link.crossOrigin = undefined;
+ link.href = _this2.assetPrefix + "/_next/static/" + encodeURIComponent(_this2.buildId) + "/pages" + scriptRoute;
+ link.as = 'script';
+ document.head.appendChild(link);
return _context2.abrupt("return");
- case 14:
+ case 19:
if (!(document.readyState === 'complete')) {
- _context2.next = 18;
+ _context2.next = 23;
break;
}
return _context2.abrupt("return", _this2.loadPage(route)["catch"](function () {}));
- case 18:
+ case 23:
return _context2.abrupt("return", new _promise["default"](function (resolve) {
window.addEventListener('load', function () {
_this2.loadPage(route).then(function () {
@@ -1378,7 +1380,7 @@ function () {
});
}));
- case 19:
+ case 24:
case "end":
return _context2.stop();
}
@@ -1386,6 +1388,18 @@ function () {
}, _callee2);
}))();
}
+ }, {
+ key: "clearCache",
+ value: function clearCache(route) {
+ route = this.normalizeRoute(route);
+ delete this.pageCache[route];
+ delete this.loadingRoutes[route];
+ var script = document.getElementById("__NEXT_PAGE__" + route);
+
+ if (script) {
+ script.parentNode.removeChild(script);
+ }
+ }
}]);
return PageLoader;
}();
See #8192 |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Testing CircleCi failures possibly due to new image released 19 hours ago