Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

fix: Revert #18921 and inline absolute babel runtime only for YarnPnp #19542

Merged
merged 2 commits into from Nov 25, 2020

Conversation

guybedford
Copy link
Contributor

This reverts #18921 and ensures that the Babel runtime is only inlined as an absolute path when using PnP as before, but then including the correction this resolution as implemented by @merceyz only in the PnP cases, while keeping the diff to a minimum.

@vercel vercel bot temporarily deployed to Preview November 25, 2020 21:58 Inactive
@ijjk
Copy link
Member

ijjk commented Nov 25, 2020

Stats from current PR

Default Server Mode (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary guybedford/next.js runtime-resolve-pnp Change
buildDuration 10.3s 10.5s ⚠️ +277ms
nodeModulesSize 85 MB 85 MB ⚠️ +142 B
Page Load Tests Overall increase ✓
vercel/next.js canary guybedford/next.js runtime-resolve-pnp Change
/ failed reqs 0 0
/ total time (seconds) 2.262 2.322 ⚠️ +0.06
/ avg req/sec 1105.18 1076.55 ⚠️ -28.63
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.337 1.287 -0.05
/error-in-render avg req/sec 1869.74 1943.18 +73.44
Client Bundles (main, webpack, commons)
vercel/next.js canary guybedford/next.js runtime-resolve-pnp Change
677f882d2ed8..8b81.js gzip 12.8 kB 12.8 kB
framework.HASH.js gzip 39 kB 39 kB
main-fbd7082..8b7a.js gzip 6.54 kB 6.54 kB
webpack-e067..f178.js gzip 751 B 751 B
Overall change 59 kB 59 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary guybedford/next.js runtime-resolve-pnp Change
polyfills-4b..e242.js gzip 31 kB 31 kB
Overall change 31 kB 31 kB
Client Pages
vercel/next.js canary guybedford/next.js runtime-resolve-pnp Change
_app-3b0cf13..85f8.js gzip 1.28 kB 1.28 kB
_error-6f635..c393.js gzip 3.44 kB 3.44 kB
hooks-d4ffc3..9e0f.js gzip 887 B 887 B
index-17468f..5d83.js gzip 227 B 227 B
link-b618194..5477.js gzip 1.61 kB 1.61 kB
routerDirect..924c.js gzip 284 B 284 B
withRouter-7..c13d.js gzip 284 B 284 B
Overall change 8.01 kB 8.01 kB
Client Build Manifests
vercel/next.js canary guybedford/next.js runtime-resolve-pnp Change
_buildManifest.js gzip 321 B 321 B
Overall change 321 B 321 B
Rendered Page Sizes
vercel/next.js canary guybedford/next.js runtime-resolve-pnp Change
index.html gzip 614 B 614 B
link.html gzip 621 B 621 B
withRouter.html gzip 608 B 608 B
Overall change 1.84 kB 1.84 kB

Diffs

Diff for _buildManifest.js
@@ -2,12 +2,12 @@ self.__BUILD_MANIFEST = {
   __rewrites: [],
   "/": ["static\u002Fchunks\u002Fpages\u002Findex-283eed3c1520dcc26e8d.js"],
   "/_error": [
-    "static\u002Fchunks\u002Fpages\u002F_error-760f653e71e48010adf7.js"
+    "static\u002Fchunks\u002Fpages\u002F_error-9b57cae5694a39479222.js"
   ],
   "/hooks": [
-    "static\u002Fchunks\u002Fpages\u002Fhooks-880757f1d73d6b241fc3.js"
+    "static\u002Fchunks\u002Fpages\u002Fhooks-bdd2cad07648acf22380.js"
   ],
-  "/link": ["static\u002Fchunks\u002Fpages\u002Flink-ba0d611ec0553be6b825.js"],
+  "/link": ["static\u002Fchunks\u002Fpages\u002Flink-00f0f71a76f57326f2aa.js"],
   "/routerDirect": [
     "static\u002Fchunks\u002Fpages\u002FrouterDirect-2e9bfd441bd88cd3382e.js"
   ],
Diff for index.html
@@ -7,7 +7,7 @@
     <noscript data-n-css=""></noscript>
     <link
       rel="preload"
-      href="/_next/static/chunks/main-1be8f767878913a01046.js"
+      href="/_next/static/chunks/main-eaa8900178673c89664d.js"
       as="script"
     />
     <link
@@ -22,12 +22,12 @@
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.8592ecbddd5517e7e4f9.js"
+      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.a8f91a45a8b4eae9202a.js"
       as="script"
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/pages/_app-a24430c6b07ae4b780ba.js"
+      href="/_next/static/chunks/pages/_app-265ddf2d03dbe48fa6cb.js"
       as="script"
     />
     <link
@@ -53,7 +53,7 @@
       src="/_next/static/chunks/polyfills-f73ba3fc145972ef83e9.js"
     ></script>
     <script
-      src="/_next/static/chunks/main-1be8f767878913a01046.js"
+      src="/_next/static/chunks/main-eaa8900178673c89664d.js"
       async=""
     ></script>
     <script
@@ -65,11 +65,11 @@
       async=""
     ></script>
     <script
-      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.8592ecbddd5517e7e4f9.js"
+      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.a8f91a45a8b4eae9202a.js"
       async=""
     ></script>
     <script
-      src="/_next/static/chunks/pages/_app-a24430c6b07ae4b780ba.js"
+      src="/_next/static/chunks/pages/_app-265ddf2d03dbe48fa6cb.js"
       async=""
     ></script>
     <script
Diff for link.html
@@ -7,7 +7,7 @@
     <noscript data-n-css=""></noscript>
     <link
       rel="preload"
-      href="/_next/static/chunks/main-1be8f767878913a01046.js"
+      href="/_next/static/chunks/main-eaa8900178673c89664d.js"
       as="script"
     />
     <link
@@ -22,17 +22,17 @@
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.8592ecbddd5517e7e4f9.js"
+      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.a8f91a45a8b4eae9202a.js"
       as="script"
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/pages/_app-a24430c6b07ae4b780ba.js"
+      href="/_next/static/chunks/pages/_app-265ddf2d03dbe48fa6cb.js"
       as="script"
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/pages/link-ba0d611ec0553be6b825.js"
+      href="/_next/static/chunks/pages/link-00f0f71a76f57326f2aa.js"
       as="script"
     />
   </head>
@@ -58,7 +58,7 @@
       src="/_next/static/chunks/polyfills-f73ba3fc145972ef83e9.js"
     ></script>
     <script
-      src="/_next/static/chunks/main-1be8f767878913a01046.js"
+      src="/_next/static/chunks/main-eaa8900178673c89664d.js"
       async=""
     ></script>
     <script
@@ -70,15 +70,15 @@
       async=""
     ></script>
     <script
-      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.8592ecbddd5517e7e4f9.js"
+      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.a8f91a45a8b4eae9202a.js"
       async=""
     ></script>
     <script
-      src="/_next/static/chunks/pages/_app-a24430c6b07ae4b780ba.js"
+      src="/_next/static/chunks/pages/_app-265ddf2d03dbe48fa6cb.js"
       async=""
     ></script>
     <script
-      src="/_next/static/chunks/pages/link-ba0d611ec0553be6b825.js"
+      src="/_next/static/chunks/pages/link-00f0f71a76f57326f2aa.js"
       async=""
     ></script>
     <script src="/_next/static/BUILD_ID/_buildManifest.js" async=""></script>
Diff for withRouter.html
@@ -7,7 +7,7 @@
     <noscript data-n-css=""></noscript>
     <link
       rel="preload"
-      href="/_next/static/chunks/main-1be8f767878913a01046.js"
+      href="/_next/static/chunks/main-eaa8900178673c89664d.js"
       as="script"
     />
     <link
@@ -22,12 +22,12 @@
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.8592ecbddd5517e7e4f9.js"
+      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.a8f91a45a8b4eae9202a.js"
       as="script"
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/pages/_app-a24430c6b07ae4b780ba.js"
+      href="/_next/static/chunks/pages/_app-265ddf2d03dbe48fa6cb.js"
       as="script"
     />
     <link
@@ -53,7 +53,7 @@
       src="/_next/static/chunks/polyfills-f73ba3fc145972ef83e9.js"
     ></script>
     <script
-      src="/_next/static/chunks/main-1be8f767878913a01046.js"
+      src="/_next/static/chunks/main-eaa8900178673c89664d.js"
       async=""
     ></script>
     <script
@@ -65,11 +65,11 @@
       async=""
     ></script>
     <script
-      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.8592ecbddd5517e7e4f9.js"
+      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.a8f91a45a8b4eae9202a.js"
       async=""
     ></script>
     <script
-      src="/_next/static/chunks/pages/_app-a24430c6b07ae4b780ba.js"
+      src="/_next/static/chunks/pages/_app-265ddf2d03dbe48fa6cb.js"
       async=""
     ></script>
     <script

Serverless Mode
General Overall increase ⚠️
vercel/next.js canary guybedford/next.js runtime-resolve-pnp Change
buildDuration 11.8s 12s ⚠️ +153ms
nodeModulesSize 85 MB 85 MB ⚠️ +142 B
Client Bundles (main, webpack, commons)
vercel/next.js canary guybedford/next.js runtime-resolve-pnp Change
677f882d2ed8..8b81.js gzip 12.8 kB N/A N/A
framework.HASH.js gzip 39 kB 39 kB
main-fbd7082..8b7a.js gzip 6.54 kB N/A N/A
webpack-e067..f178.js gzip 751 B 751 B
677f882d2ed8..8b6e.js gzip N/A 12.8 kB N/A
main-90b3d5a..55ad.js gzip N/A 6.54 kB N/A
Overall change 59 kB 59 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary guybedford/next.js runtime-resolve-pnp Change
polyfills-4b..e242.js gzip 31 kB 31 kB
Overall change 31 kB 31 kB
Client Pages
vercel/next.js canary guybedford/next.js runtime-resolve-pnp Change
_app-3b0cf13..85f8.js gzip 1.28 kB N/A N/A
_error-6f635..c393.js gzip 3.44 kB N/A N/A
hooks-d4ffc3..9e0f.js gzip 887 B N/A N/A
index-17468f..5d83.js gzip 227 B 227 B
link-b618194..5477.js gzip 1.61 kB N/A N/A
routerDirect..924c.js gzip 284 B 284 B
withRouter-7..c13d.js gzip 284 B 284 B
_app-7231d4b..5856.js gzip N/A 1.28 kB N/A
_error-fca3d..2eb1.js gzip N/A 3.44 kB N/A
hooks-d4591d..e7c2.js gzip N/A 887 B N/A
link-db223d9..dbd7.js gzip N/A 1.61 kB N/A
Overall change 8.01 kB 8.01 kB
Client Build Manifests
vercel/next.js canary guybedford/next.js runtime-resolve-pnp Change
_buildManifest.js gzip 321 B 321 B
Overall change 321 B 321 B
Serverless bundles
vercel/next.js canary guybedford/next.js runtime-resolve-pnp Change
_error.js 996 kB 996 kB
404.html 2.67 kB 2.67 kB
hooks.html 1.92 kB 1.92 kB
index.js 996 kB 996 kB
link.js 1.05 MB 1.05 MB
routerDirect.js 1.04 MB 1.04 MB
withRouter.js 1.04 MB 1.04 MB
Overall change 5.13 MB 5.13 MB
Commit: d369b90

@kodiakhq kodiakhq bot merged commit 9dd5ff2 into vercel:canary Nov 25, 2020
@merceyz
Copy link
Contributor

merceyz commented Nov 25, 2020

This trades one bug for another and will cause PnP users doing the same thing the same issue, i'd argue the fix in #19538 is the correct one

@guybedford
Copy link
Contributor Author

@merceyz an adjustment to #19538 that applies only in the pnp + webpack case can be an option certainly for pnp users.

The goal was just to ship the fix asap here with the bare minimal semantic changes - that does not preclude further semantic changes though as per your PR.

kamermans pushed a commit to kamermans/next.js that referenced this pull request Dec 14, 2020
…arnPnp (vercel#19542)

This reverts vercel#18921 and ensures that the Babel runtime is only inlined as an absolute path when using PnP as before, but then including the correction this resolution as implemented by @merceyz only in the PnP cases, while keeping the diff to a minimum.
@vercel vercel locked as resolved and limited conversation to collaborators Jan 29, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants