-
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
Fix bug with getServerSideProps when swcLoader is enabled #29760
Merged
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
timneutkens
requested review from
huozhi,
ijjk,
padmaia,
shuding and
styfle
as code owners
October 9, 2021 13:31
Triggered the SWC recompile action |
This comment has been minimized.
This comment has been minimized.
Stats from current PRDefault Build (Decrease detected ✓)General Overall increase
|
vercel/next.js canary | timneutkens/next.js fix/gssp-swc-bug | Change | |
---|---|---|---|
buildDuration | 12.3s | 12.3s | |
buildDurationCached | 2.9s | 2.9s | -14ms |
nodeModulesSize | 194 MB | 194 MB |
Page Load Tests Overall decrease ⚠️
vercel/next.js canary | timneutkens/next.js fix/gssp-swc-bug | Change | |
---|---|---|---|
/ failed reqs | 0 | 0 | ✓ |
/ total time (seconds) | 2.746 | 2.769 | |
/ avg req/sec | 910.34 | 902.9 | |
/error-in-render failed reqs | 0 | 0 | ✓ |
/error-in-render total time (seconds) | 1.286 | 1.315 | |
/error-in-render avg req/sec | 1943.64 | 1900.87 |
Client Bundles (main, webpack, commons)
vercel/next.js canary | timneutkens/next.js fix/gssp-swc-bug | 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.9 kB | ✓ |
webpack-HASH.js gzip | 1.45 kB | 1.45 kB | ✓ |
Overall change | 70.8 kB | 70.8 kB | ✓ |
Legacy Client Bundles (polyfills)
vercel/next.js canary | timneutkens/next.js fix/gssp-swc-bug | Change | |
---|---|---|---|
polyfills-a4..dd70.js gzip | 31 kB | 31 kB | ✓ |
Overall change | 31 kB | 31 kB | ✓ |
Client Pages
vercel/next.js canary | timneutkens/next.js fix/gssp-swc-bug | Change | |
---|---|---|---|
_app-HASH.js gzip | 977 B | 977 B | ✓ |
_error-HASH.js gzip | 194 B | 194 B | ✓ |
amp-HASH.js gzip | 311 B | 311 B | ✓ |
css-HASH.js gzip | 328 B | 328 B | ✓ |
dynamic-HASH.js gzip | 2.67 kB | 2.67 kB | ✓ |
head-HASH.js gzip | 351 B | 351 B | ✓ |
hooks-HASH.js gzip | 918 B | 918 B | ✓ |
image-HASH.js gzip | 4.12 kB | 4.12 kB | ✓ |
index-HASH.js gzip | 260 B | 260 B | ✓ |
link-HASH.js gzip | 1.66 kB | 1.66 kB | ✓ |
routerDirect..HASH.js gzip | 320 B | 320 B | ✓ |
script-HASH.js gzip | 386 B | 386 B | ✓ |
withRouter-HASH.js gzip | 319 B | 319 B | ✓ |
bb14e60e810b..30f.css gzip | 125 B | 125 B | ✓ |
Overall change | 12.9 kB | 12.9 kB | ✓ |
Client Build Manifests
vercel/next.js canary | timneutkens/next.js fix/gssp-swc-bug | Change | |
---|---|---|---|
_buildManifest.js gzip | 494 B | 494 B | ✓ |
Overall change | 494 B | 494 B | ✓ |
Rendered Page Sizes
vercel/next.js canary | timneutkens/next.js fix/gssp-swc-bug | Change | |
---|---|---|---|
index.html gzip | 539 B | 539 B | ✓ |
link.html gzip | 551 B | 551 B | ✓ |
withRouter.html gzip | 533 B | 533 B | ✓ |
Overall change | 1.62 kB | 1.62 kB | ✓ |
Default Build with SWC (Increase detected ⚠️ )
General Overall increase ⚠️
vercel/next.js canary | timneutkens/next.js fix/gssp-swc-bug | Change | |
---|---|---|---|
buildDuration | 6.2s | 6.3s | |
buildDurationCached | 3s | 2.9s | -105ms |
nodeModulesSize | 194 MB | 194 MB |
Page Load Tests Overall increase ✓
vercel/next.js canary | timneutkens/next.js fix/gssp-swc-bug | Change | |
---|---|---|---|
/ failed reqs | 0 | 0 | ✓ |
/ total time (seconds) | 2.781 | 2.745 | -0.04 |
/ avg req/sec | 898.8 | 910.59 | +11.79 |
/error-in-render failed reqs | 0 | 0 | ✓ |
/error-in-render total time (seconds) | 1.307 | 1.295 | -0.01 |
/error-in-render avg req/sec | 1912.66 | 1930.94 | +18.28 |
Client Bundles (main, webpack, commons)
vercel/next.js canary | timneutkens/next.js fix/gssp-swc-bug | Change | |
---|---|---|---|
675-HASH.js gzip | 13.8 kB | 13.8 kB | ✓ |
770.HASH.js gzip | 178 B | 178 B | ✓ |
framework-HASH.js gzip | 50.7 kB | 50.7 kB | ✓ |
main-HASH.js gzip | 35 kB | 35 kB | ✓ |
webpack-HASH.js gzip | 1.64 kB | 1.64 kB | ✓ |
Overall change | 101 kB | 101 kB | ✓ |
Legacy Client Bundles (polyfills)
vercel/next.js canary | timneutkens/next.js fix/gssp-swc-bug | 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 fix/gssp-swc-bug | Change | |
---|---|---|---|
_app-HASH.js gzip | 1.33 kB | 1.33 kB | ✓ |
_error-HASH.js gzip | 180 B | 180 B | ✓ |
amp-HASH.js gzip | 315 B | 315 B | ✓ |
css-HASH.js gzip | 331 B | 331 B | ✓ |
dynamic-HASH.js gzip | 2.79 kB | 2.79 kB | ✓ |
head-HASH.js gzip | 356 B | 355 B | -1 B |
hooks-HASH.js gzip | 637 B | 637 B | ✓ |
image-HASH.js gzip | 557 B | 555 B | -2 B |
index-HASH.js gzip | 262 B | 261 B | -1 B |
link-HASH.js gzip | 2.22 kB | 2.22 kB | ✓ |
routerDirect..HASH.js gzip | 326 B | 326 B | ✓ |
script-HASH.js gzip | 393 B | 393 B | ✓ |
withRouter-HASH.js gzip | 322 B | 322 B | ✓ |
bb14e60e810b..30f.css gzip | 125 B | 125 B | ✓ |
Overall change | 10.1 kB | 10.1 kB | -4 B |
Client Build Manifests
vercel/next.js canary | timneutkens/next.js fix/gssp-swc-bug | Change | |
---|---|---|---|
_buildManifest.js gzip | 511 B | 511 B | ✓ |
Overall change | 511 B | 511 B | ✓ |
Rendered Page Sizes Overall decrease ✓
vercel/next.js canary | timneutkens/next.js fix/gssp-swc-bug | Change | |
---|---|---|---|
index.html gzip | 539 B | 537 B | -2 B |
link.html gzip | 552 B | 552 B | ✓ |
withRouter.html gzip | 533 B | 533 B | ✓ |
Overall change | 1.62 kB | 1.62 kB | -2 B |
Diffs
Diff for _buildManifest.js
@@ -1,6 +1,6 @@
self.__BUILD_MANIFEST = {
__rewrites: { beforeFiles: [], afterFiles: [], fallback: [] },
- "/": ["static\u002Fchunks\u002Fpages\u002Findex-578dd16f542138d115d9.js"],
+ "/": ["static\u002Fchunks\u002Fpages\u002Findex-ab3eacf0db76ede5c34e.js"],
"/_error": [
"static\u002Fchunks\u002Fpages\u002F_error-9e1a6d936e12ddc840ba.js"
],
@@ -10,25 +10,25 @@ self.__BUILD_MANIFEST = {
"static\u002Fchunks\u002Fpages\u002Fcss-b933e198cac52ec08478.js"
],
"/dynamic": [
- "static\u002Fchunks\u002Fpages\u002Fdynamic-2c0ea1f3fa06461635ef.js"
+ "static\u002Fchunks\u002Fpages\u002Fdynamic-6d23c90f2595f3596b95.js"
],
- "/head": ["static\u002Fchunks\u002Fpages\u002Fhead-94efda3a2dea2f3c43a9.js"],
+ "/head": ["static\u002Fchunks\u002Fpages\u002Fhead-7bb5bee479e60e9cbbf6.js"],
"/hooks": [
"static\u002Fchunks\u002Fpages\u002Fhooks-57657d9807f56726f7b7.js"
],
"/image": [
"static\u002Fchunks\u002F675-e36478c6435f19ec761d.js",
- "static\u002Fchunks\u002Fpages\u002Fimage-54733aeb9002fa108f3f.js"
+ "static\u002Fchunks\u002Fpages\u002Fimage-7adb256b36a03439bd79.js"
],
- "/link": ["static\u002Fchunks\u002Fpages\u002Flink-7f8f722ace4fedf0a7aa.js"],
+ "/link": ["static\u002Fchunks\u002Fpages\u002Flink-88e6441e88b717c1f4fe.js"],
"/routerDirect": [
- "static\u002Fchunks\u002Fpages\u002FrouterDirect-0d86a6c6dd6bc4048b0b.js"
+ "static\u002Fchunks\u002Fpages\u002FrouterDirect-afb5e539aab48677ee82.js"
],
"/script": [
- "static\u002Fchunks\u002Fpages\u002Fscript-c1a5847a6de5a67f5d87.js"
+ "static\u002Fchunks\u002Fpages\u002Fscript-3bd2b6d599dff985e742.js"
],
"/withRouter": [
- "static\u002Fchunks\u002Fpages\u002FwithRouter-4ecb289970809ca52b13.js"
+ "static\u002Fchunks\u002Fpages\u002FwithRouter-42d971b6e1d5b9681097.js"
],
sortedPages: [
"\u002F",
Diff for dynamic-HASH.js
@@ -576,8 +576,8 @@
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
- /* harmony export */ __N_SSG: function() {
- return /* binding */ __N_SSG;
+ /* harmony export */ __N_SSP: function() {
+ return /* binding */ __N_SSP;
}
/* harmony export */
});
@@ -623,7 +623,7 @@
}
);
};
- var __N_SSG = true;
+ var __N_SSP = true;
/* harmony default export */ __webpack_exports__["default"] = Page;
/***/
Diff for head-HASH.js
@@ -24,8 +24,8 @@
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
- /* harmony export */ __N_SSG: function() {
- return /* binding */ __N_SSG;
+ /* harmony export */ __N_SSP: function() {
+ return /* binding */ __N_SSP;
}
/* harmony export */
});
@@ -60,7 +60,7 @@
}
);
};
- var __N_SSG = true;
+ var __N_SSP = true;
/* harmony default export */ __webpack_exports__["default"] = Page;
/***/
Diff for image-HASH.js
@@ -27,8 +27,8 @@
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
- __N_SSG: function() {
- return /* binding */ __N_SSG;
+ __N_SSP: function() {
+ return /* binding */ __N_SSP;
},
default: function() {
return /* binding */ pages_image;
@@ -60,7 +60,7 @@
]
});
}
- var __N_SSG = true;
+ var __N_SSP = true;
/* harmony default export */ var pages_image = ImagePage;
/***/
Diff for index-HASH.js
@@ -24,15 +24,15 @@
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
- /* harmony export */ __N_SSG: function() {
- return /* binding */ __N_SSG;
+ /* harmony export */ __N_SSP: function() {
+ return /* binding */ __N_SSP;
}
/* harmony export */
});
var Page = function() {
return "Hello world 👋";
};
- var __N_SSG = true;
+ var __N_SSP = true;
/* harmony default export */ __webpack_exports__["default"] = Page;
/***/
Diff for link-HASH.js
@@ -461,8 +461,8 @@
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
- /* harmony export */ __N_SSG: function() {
- return /* binding */ __N_SSG;
+ /* harmony export */ __N_SSP: function() {
+ return /* binding */ __N_SSP;
}
/* harmony export */
});
@@ -492,7 +492,7 @@
]
});
}
- var __N_SSG = true;
+ var __N_SSP = true;
/* harmony default export */ __webpack_exports__["default"] = aLink;
/***/
Diff for routerDirect-HASH.js
@@ -24,8 +24,8 @@
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
- /* harmony export */ __N_SSG: function() {
- return /* binding */ __N_SSG;
+ /* harmony export */ __N_SSP: function() {
+ return /* binding */ __N_SSP;
}
/* harmony export */
});
@@ -44,7 +44,7 @@
children: "I import the router directly"
});
}
- var __N_SSG = true;
+ var __N_SSP = true;
/* harmony default export */ __webpack_exports__[
"default"
] = routerDirect;
Diff for script-HASH.js
@@ -24,8 +24,8 @@
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
- /* harmony export */ __N_SSG: function() {
- return /* binding */ __N_SSG;
+ /* harmony export */ __N_SSP: function() {
+ return /* binding */ __N_SSP;
}
/* harmony export */
});
@@ -59,7 +59,7 @@
}
);
};
- var __N_SSG = true;
+ var __N_SSP = true;
/* harmony default export */ __webpack_exports__["default"] = Page;
/***/
Diff for withRouter-HASH.js
@@ -24,8 +24,8 @@
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
- /* harmony export */ __N_SSG: function() {
- return /* binding */ __N_SSG;
+ /* harmony export */ __N_SSP: function() {
+ return /* binding */ __N_SSP;
}
/* harmony export */
});
@@ -42,7 +42,7 @@
children: "I use withRouter"
});
}
- var __N_SSG = true;
+ var __N_SSP = true;
/* harmony default export */ __webpack_exports__["default"] = (0,
next_router__WEBPACK_IMPORTED_MODULE_1__.withRouter)(useWithRouter);
Diff for index.html
@@ -27,7 +27,7 @@
defer=""
></script>
<script
- src="/_next/static/chunks/pages/index-578dd16f542138d115d9.js"
+ src="/_next/static/chunks/pages/index-ab3eacf0db76ede5c34e.js"
defer=""
></script>
<script src="/_next/static/BUILD_ID/_buildManifest.js" defer=""></script>
Diff for link.html
@@ -27,7 +27,7 @@
defer=""
></script>
<script
- src="/_next/static/chunks/pages/link-7f8f722ace4fedf0a7aa.js"
+ src="/_next/static/chunks/pages/link-88e6441e88b717c1f4fe.js"
defer=""
></script>
<script src="/_next/static/BUILD_ID/_buildManifest.js" defer=""></script>
Diff for withRouter.html
@@ -27,7 +27,7 @@
defer=""
></script>
<script
- src="/_next/static/chunks/pages/withRouter-4ecb289970809ca52b13.js"
+ src="/_next/static/chunks/pages/withRouter-42d971b6e1d5b9681097.js"
defer=""
></script>
<script src="/_next/static/BUILD_ID/_buildManifest.js" defer=""></script>
ijjk
approved these changes
Oct 9, 2021
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.
Ported from #29185
These are all related to
swcLoader
:getServerSideProps
not getting querystrings and added tests for itsourcesContent
is part of the sourcemapBug
fixes #number
contributing.md
Feature
fixes #number
contributing.md
Documentation / Examples