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

Uses the PnP API when available #8668

Merged
merged 5 commits into from Sep 9, 2019
Merged

Conversation

arcanis
Copy link
Contributor

@arcanis arcanis commented Sep 8, 2019

Fix #8659

When available, the PnP API is used instead of the resolve package to find out if the specified package is resolvable from the top-level application (similar to what the regular codepath does).

Speaking of which, I'm not sure this logic is 100% correct - if the app depends on next and Foo, and if next depends on Foo and uses it in the generated documents, it won't be bundled into the app (which will then use the top-level version instead of the original one) because it will be resolvable from the basedir. Not entirely sure what's the right fix given Next's architecture. Not relevant to this diff anyway 😊

@ijjk
Copy link
Member

ijjk commented Sep 8, 2019

Stats from current PR

Default Server Mode (Increase detected ⚠️)
General Overall decrease ✓
zeit/next.js canary arcanis/next.js mael/pnp-externals Change
buildDuration 22.5s 21.5s -1s
nodeModulesSize 42.4 MB 42.4 MB -20.1 kB
Client Bundles (main, webpack, commons) Overall decrease ✓
zeit/next.js canary arcanis/next.js mael/pnp-externals Change
main-HASH.js 18.2 kB 18.2 kB -1 B
main-HASH.js gzip 6.64 kB 6.64 kB -1 B
webpack-HASH.js 1.53 kB 1.53 kB
webpack-HASH.js gzip 746 B 746 B
16b2b5f78d65..2b8407376.js 21.9 kB N/A N/A
16b2b5f78d65..7376.js gzip 7.81 kB N/A N/A
427650be2c1b..799a4e38e.js 43.1 kB N/A N/A
427650be2c1b..e38e.js gzip 15.4 kB N/A N/A
framework.5b..dbaff70d3.js 125 kB 125 kB
framework.5b..70d3.js gzip 39.4 kB 39.4 kB
817ef1005ebf..2b8407376.js N/A 21.9 kB N/A
817ef1005ebf..7376.js gzip N/A 7.81 kB N/A
c498350d8f10..799a4e38e.js N/A 43.1 kB N/A
c498350d8f10..e38e.js gzip N/A 15.4 kB N/A
Overall change 210 kB 210 kB -1 B
Client Bundles (main, webpack, commons) Modern Overall decrease ✓
zeit/next.js canary arcanis/next.js mael/pnp-externals Change
main-HASH.module.js 16.6 kB 16.6 kB -1 B
main-HASH.module.js gzip 6.38 kB 6.38 kB
webpack-HASH.module.js 1.53 kB 1.53 kB
webpack-HASH..dule.js gzip 746 B 746 B
427650be2c1b..f0.module.js 45.5 kB N/A N/A
427650be2c1b..dule.js gzip 16.5 kB N/A N/A
framework.5b..d3.module.js 125 kB 125 kB
framework.5b..dule.js gzip 39.4 kB 39.4 kB
c498350d8f10..f0.module.js N/A 45.5 kB N/A
c498350d8f10..dule.js gzip N/A 16.5 kB N/A
Overall change 189 kB 189 kB -1 B
Client Pages Overall increase ⚠️
zeit/next.js canary arcanis/next.js mael/pnp-externals Change
_app.js 1.83 kB 1.83 kB
_app.js gzip 883 B 883 B
_error.js 12.1 kB 12.1 kB
_error.js gzip 4.74 kB 4.74 kB
hooks.js 12.7 kB 12.7 kB
hooks.js gzip 4.81 kB 4.81 kB
index.js 343 B 343 B
index.js gzip 237 B 237 B
link.js 8.14 kB 8.14 kB
link.js gzip 3.49 kB 3.49 kB ⚠️ +1 B
routerDirect.js 433 B 434 B ⚠️ +1 B
routerDirect.js gzip 296 B 296 B
withRouter.js 444 B 444 B
withRouter.js gzip 294 B 294 B
Overall change 36 kB 36 kB ⚠️ +1 B
Client Pages Modern Overall increase ⚠️
zeit/next.js canary arcanis/next.js mael/pnp-externals Change
_app.module.js 1.73 kB 1.73 kB
_app.module.js gzip 841 B 840 B -1 B
_error.module.js 23.3 kB 23.3 kB
_error.module.js gzip 8.6 kB 8.6 kB
hooks.module.js 1.55 kB 1.55 kB
hooks.module.js gzip 804 B 805 B ⚠️ +1 B
index.module.js 319 B 319 B
index.module.js gzip 238 B 238 B
link.module.js 8.52 kB 8.52 kB
link.module.js gzip 3.67 kB 3.67 kB
routerDirect.module.js 419 B 419 B
routerDirect..dule.js gzip 294 B 294 B
withRouter.module.js 429 B 430 B ⚠️ +1 B
withRouter.m..dule.js gzip 293 B 293 B
Overall change 36.2 kB 36.2 kB ⚠️ +1 B
Client Build Manifests
zeit/next.js canary arcanis/next.js mael/pnp-externals Change
_buildManifest.js 81 B 81 B
_buildManifest.js gzip 61 B 61 B
_buildManifest.module.js 81 B 81 B
_buildManife..dule.js gzip 61 B 61 B
Overall change 162 B 162 B
Rendered Page Sizes
zeit/next.js canary arcanis/next.js mael/pnp-externals Change
index.html 3.75 kB 3.75 kB
index.html gzip 959 B 961 B ⚠️ +2 B
link.html 3.79 kB 3.79 kB
link.html gzip 968 B 970 B ⚠️ +2 B
withRouter.html 3.8 kB 3.8 kB
withRouter.html gzip 955 B 957 B ⚠️ +2 B
Overall change 11.3 kB 11.3 kB

Diffs

Diff for index.html
@@ -6,9 +6,9 @@
         <meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1"
         />
         <meta name="next-head-count" content="2" />
-        <link rel="preload" href="/_next/static/V57Inh7FhDPLqpT5fIT1V/pages/index.module.js"
+        <link rel="preload" href="/_next/static/6cm3GMFkQmlpYbATXnDRE/pages/index.module.js"
         as="script" crossorigin="anonymous" />
-        <link rel="preload" href="/_next/static/V57Inh7FhDPLqpT5fIT1V/pages/_app.module.js"
+        <link rel="preload" href="/_next/static/6cm3GMFkQmlpYbATXnDRE/pages/_app.module.js"
         as="script" crossorigin="anonymous" />
         <link rel="preload" href="/_next/static/runtime/webpack-7928590be3ef2e55b835.module.js"
         as="script" crossorigin="anonymous" />
@@ -16,9 +16,9 @@
         as="script" crossorigin="anonymous" />
         <link rel="preload" href="/_next/static/chunks/framework.cdb73e402d876d4ac87f.module.js"
         as="script" crossorigin="anonymous" />
-        <link rel="preload" href="/_next/static/chunks/538929eb098d29bd8795a8d91b62f85c2cd70180.85e4c18b9e4b400e5496.module.js"
+        <link rel="preload" href="/_next/static/chunks/9c55f52966eec015ca752d895b72be32ded85f1c.85e4c18b9e4b400e5496.module.js"
         as="script" crossorigin="anonymous" />
-        <link rel="preload" href="/_next/static/V57Inh7FhDPLqpT5fIT1V/_buildManifest.module.js"
+        <link rel="preload" href="/_next/static/6cm3GMFkQmlpYbATXnDRE/_buildManifest.module.js"
         as="script" crossorigin="anonymous" />
     </head>
     
@@ -26,18 +26,18 @@
         <div id="__next">Hello world 👋</div>
         <script id="__NEXT_DATA__" type="application/json"
         crossorigin="anonymous">
-            {"dataManager":"[]","props":{"pageProps":{}},"page":"/","query":{},"buildId":"V57Inh7FhDPLqpT5fIT1V"}
+            {"dataManager":"[]","props":{"pageProps":{}},"page":"/","query":{},"buildId":"6cm3GMFkQmlpYbATXnDRE"}
         </script>
         <script crossorigin="anonymous" nomodule="">
             !function(){var e=document,t=e.createElement("script");if(!("noModule"in t)&&"onbeforeload"in t){var n=!1;e.addEventListener("beforeload",function(e){if(e.target===t)n=!0;else if(!e.target.hasAttribute("nomodule")||!n)return;e.preventDefault()},!0),t.type="module",t.src=".",e.head.appendChild(t),t.remove()}}();
         </script>
-        <script async="" data-next-page="/" src="/_next/static/V57Inh7FhDPLqpT5fIT1V/pages/index.js"
+        <script async="" data-next-page="/" src="/_next/static/6cm3GMFkQmlpYbATXnDRE/pages/index.js"
         crossorigin="anonymous" nomodule=""></script>
-        <script async="" data-next-page="/" src="/_next/static/V57Inh7FhDPLqpT5fIT1V/pages/index.module.js"
+        <script async="" data-next-page="/" src="/_next/static/6cm3GMFkQmlpYbATXnDRE/pages/index.module.js"
         crossorigin="anonymous" type="module"></script>
-        <script async="" data-next-page="/_app" src="/_next/static/V57Inh7FhDPLqpT5fIT1V/pages/_app.js"
+        <script async="" data-next-page="/_app" src="/_next/static/6cm3GMFkQmlpYbATXnDRE/pages/_app.js"
         crossorigin="anonymous" nomodule=""></script>
-        <script async="" data-next-page="/_app" src="/_next/static/V57Inh7FhDPLqpT5fIT1V/pages/_app.module.js"
+        <script async="" data-next-page="/_app" src="/_next/static/6cm3GMFkQmlpYbATXnDRE/pages/_app.module.js"
         crossorigin="anonymous" type="module"></script>
         <script src="/_next/static/runtime/webpack-a470c2a25bcb4d5a8ec0.js"
         async="" crossorigin="anonymous" nomodule=""></script>
@@ -51,15 +51,15 @@
         async="" crossorigin="anonymous" nomodule=""></script>
         <script src="/_next/static/chunks/framework.cdb73e402d876d4ac87f.module.js"
         async="" crossorigin="anonymous" type="module"></script>
-        <script src="/_next/static/chunks/8c874e6432cc280a7a4f4bb5c9a34ab58459d223.155621535702fe040780.js"
+        <script src="/_next/static/chunks/228e1f4e893fa3baf19d35d232c5645368446558.155621535702fe040780.js"
         async="" crossorigin="anonymous" nomodule=""></script>
-        <script src="/_next/static/chunks/538929eb098d29bd8795a8d91b62f85c2cd70180.b3f63bf01308f3d17f5c.js"
+        <script src="/_next/static/chunks/9c55f52966eec015ca752d895b72be32ded85f1c.b3f63bf01308f3d17f5c.js"
         async="" crossorigin="anonymous" nomodule=""></script>
-        <script src="/_next/static/chunks/538929eb098d29bd8795a8d91b62f85c2cd70180.85e4c18b9e4b400e5496.module.js"
+        <script src="/_next/static/chunks/9c55f52966eec015ca752d895b72be32ded85f1c.85e4c18b9e4b400e5496.module.js"
         async="" crossorigin="anonymous" type="module"></script>
-        <script src="/_next/static/V57Inh7FhDPLqpT5fIT1V/_buildManifest.js"
+        <script src="/_next/static/6cm3GMFkQmlpYbATXnDRE/_buildManifest.js"
         async="" crossorigin="anonymous" nomodule=""></script>
-        <script src="/_next/static/V57Inh7FhDPLqpT5fIT1V/_buildManifest.module.js"
+        <script src="/_next/static/6cm3GMFkQmlpYbATXnDRE/_buildManifest.module.js"
         async="" crossorigin="anonymous" type="module"></script>
     </body>
Diff for link.html
@@ -6,19 +6,19 @@
         <meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1"
         />
         <meta name="next-head-count" content="2" />
-        <link rel="preload" href="/_next/static/V57Inh7FhDPLqpT5fIT1V/pages/link.module.js"
+        <link rel="preload" href="/_next/static/6cm3GMFkQmlpYbATXnDRE/pages/link.module.js"
         as="script" crossorigin="anonymous" />
-        <link rel="preload" href="/_next/static/V57Inh7FhDPLqpT5fIT1V/pages/_app.module.js"
+        <link rel="preload" href="/_next/static/6cm3GMFkQmlpYbATXnDRE/pages/_app.module.js"
         as="script" crossorigin="anonymous" />
         <link rel="preload" href="/_next/static/runtime/webpack-7928590be3ef2e55b835.module.js"
         as="script" crossorigin="anonymous" />
         <link rel="preload" href="/_next/static/chunks/framework.cdb73e402d876d4ac87f.module.js"
         as="script" crossorigin="anonymous" />
-        <link rel="preload" href="/_next/static/chunks/538929eb098d29bd8795a8d91b62f85c2cd70180.85e4c18b9e4b400e5496.module.js"
+        <link rel="preload" href="/_next/static/chunks/9c55f52966eec015ca752d895b72be32ded85f1c.85e4c18b9e4b400e5496.module.js"
         as="script" crossorigin="anonymous" />
         <link rel="preload" href="/_next/static/runtime/main-e3367c6cc0a826287f74.module.js"
         as="script" crossorigin="anonymous" />
-        <link rel="preload" href="/_next/static/V57Inh7FhDPLqpT5fIT1V/_buildManifest.module.js"
+        <link rel="preload" href="/_next/static/6cm3GMFkQmlpYbATXnDRE/_buildManifest.module.js"
         as="script" crossorigin="anonymous" />
     </head>
     
@@ -29,18 +29,18 @@
             </div>
         </div>
         <script id="__NEXT_DATA__" type="application/json" crossorigin="anonymous">
-            {"dataManager":"[]","props":{"pageProps":{}},"page":"/link","query":{},"buildId":"V57Inh7FhDPLqpT5fIT1V"}
+            {"dataManager":"[]","props":{"pageProps":{}},"page":"/link","query":{},"buildId":"6cm3GMFkQmlpYbATXnDRE"}
         </script>
         <script crossorigin="anonymous" nomodule="">
             !function(){var e=document,t=e.createElement("script");if(!("noModule"in t)&&"onbeforeload"in t){var n=!1;e.addEventListener("beforeload",function(e){if(e.target===t)n=!0;else if(!e.target.hasAttribute("nomodule")||!n)return;e.preventDefault()},!0),t.type="module",t.src=".",e.head.appendChild(t),t.remove()}}();
         </script>
-        <script async="" data-next-page="/link" src="/_next/static/V57Inh7FhDPLqpT5fIT1V/pages/link.js"
+        <script async="" data-next-page="/link" src="/_next/static/6cm3GMFkQmlpYbATXnDRE/pages/link.js"
         crossorigin="anonymous" nomodule=""></script>
-        <script async="" data-next-page="/link" src="/_next/static/V57Inh7FhDPLqpT5fIT1V/pages/link.module.js"
+        <script async="" data-next-page="/link" src="/_next/static/6cm3GMFkQmlpYbATXnDRE/pages/link.module.js"
         crossorigin="anonymous" type="module"></script>
-        <script async="" data-next-page="/_app" src="/_next/static/V57Inh7FhDPLqpT5fIT1V/pages/_app.js"
+        <script async="" data-next-page="/_app" src="/_next/static/6cm3GMFkQmlpYbATXnDRE/pages/_app.js"
         crossorigin="anonymous" nomodule=""></script>
-        <script async="" data-next-page="/_app" src="/_next/static/V57Inh7FhDPLqpT5fIT1V/pages/_app.module.js"
+        <script async="" data-next-page="/_app" src="/_next/static/6cm3GMFkQmlpYbATXnDRE/pages/_app.module.js"
         crossorigin="anonymous" type="module"></script>
         <script src="/_next/static/runtime/webpack-a470c2a25bcb4d5a8ec0.js"
         async="" crossorigin="anonymous" nomodule=""></script>
@@ -50,19 +50,19 @@
         async="" crossorigin="anonymous" nomodule=""></script>
         <script src="/_next/static/chunks/framework.cdb73e402d876d4ac87f.module.js"
         async="" crossorigin="anonymous" type="module"></script>
-        <script src="/_next/static/chunks/8c874e6432cc280a7a4f4bb5c9a34ab58459d223.155621535702fe040780.js"
+        <script src="/_next/static/chunks/228e1f4e893fa3baf19d35d232c5645368446558.155621535702fe040780.js"
         async="" crossorigin="anonymous" nomodule=""></script>
-        <script src="/_next/static/chunks/538929eb098d29bd8795a8d91b62f85c2cd70180.b3f63bf01308f3d17f5c.js"
+        <script src="/_next/static/chunks/9c55f52966eec015ca752d895b72be32ded85f1c.b3f63bf01308f3d17f5c.js"
         async="" crossorigin="anonymous" nomodule=""></script>
-        <script src="/_next/static/chunks/538929eb098d29bd8795a8d91b62f85c2cd70180.85e4c18b9e4b400e5496.module.js"
+        <script src="/_next/static/chunks/9c55f52966eec015ca752d895b72be32ded85f1c.85e4c18b9e4b400e5496.module.js"
         async="" crossorigin="anonymous" type="module"></script>
         <script src="/_next/static/runtime/main-26e9253859bbcb659328.js"
         async="" crossorigin="anonymous" nomodule=""></script>
         <script src="/_next/static/runtime/main-e3367c6cc0a826287f74.module.js"
         async="" crossorigin="anonymous" type="module"></script>
-        <script src="/_next/static/V57Inh7FhDPLqpT5fIT1V/_buildManifest.js"
+        <script src="/_next/static/6cm3GMFkQmlpYbATXnDRE/_buildManifest.js"
         async="" crossorigin="anonymous" nomodule=""></script>
-        <script src="/_next/static/V57Inh7FhDPLqpT5fIT1V/_buildManifest.module.js"
+        <script src="/_next/static/6cm3GMFkQmlpYbATXnDRE/_buildManifest.module.js"
         async="" crossorigin="anonymous" type="module"></script>
     </body>
Diff for withRouter.html
@@ -6,19 +6,19 @@
         <meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1"
         />
         <meta name="next-head-count" content="2" />
-        <link rel="preload" href="/_next/static/V57Inh7FhDPLqpT5fIT1V/pages/withRouter.module.js"
+        <link rel="preload" href="/_next/static/6cm3GMFkQmlpYbATXnDRE/pages/withRouter.module.js"
         as="script" crossorigin="anonymous" />
-        <link rel="preload" href="/_next/static/V57Inh7FhDPLqpT5fIT1V/pages/_app.module.js"
+        <link rel="preload" href="/_next/static/6cm3GMFkQmlpYbATXnDRE/pages/_app.module.js"
         as="script" crossorigin="anonymous" />
         <link rel="preload" href="/_next/static/runtime/webpack-7928590be3ef2e55b835.module.js"
         as="script" crossorigin="anonymous" />
         <link rel="preload" href="/_next/static/chunks/framework.cdb73e402d876d4ac87f.module.js"
         as="script" crossorigin="anonymous" />
-        <link rel="preload" href="/_next/static/chunks/538929eb098d29bd8795a8d91b62f85c2cd70180.85e4c18b9e4b400e5496.module.js"
+        <link rel="preload" href="/_next/static/chunks/9c55f52966eec015ca752d895b72be32ded85f1c.85e4c18b9e4b400e5496.module.js"
         as="script" crossorigin="anonymous" />
         <link rel="preload" href="/_next/static/runtime/main-e3367c6cc0a826287f74.module.js"
         as="script" crossorigin="anonymous" />
-        <link rel="preload" href="/_next/static/V57Inh7FhDPLqpT5fIT1V/_buildManifest.module.js"
+        <link rel="preload" href="/_next/static/6cm3GMFkQmlpYbATXnDRE/_buildManifest.module.js"
         as="script" crossorigin="anonymous" />
     </head>
     
@@ -27,18 +27,18 @@
             <div>I use withRouter</div>
         </div>
         <script id="__NEXT_DATA__" type="application/json" crossorigin="anonymous">
-            {"dataManager":"[]","props":{"pageProps":{}},"page":"/withRouter","query":{},"buildId":"V57Inh7FhDPLqpT5fIT1V"}
+            {"dataManager":"[]","props":{"pageProps":{}},"page":"/withRouter","query":{},"buildId":"6cm3GMFkQmlpYbATXnDRE"}
         </script>
         <script crossorigin="anonymous" nomodule="">
             !function(){var e=document,t=e.createElement("script");if(!("noModule"in t)&&"onbeforeload"in t){var n=!1;e.addEventListener("beforeload",function(e){if(e.target===t)n=!0;else if(!e.target.hasAttribute("nomodule")||!n)return;e.preventDefault()},!0),t.type="module",t.src=".",e.head.appendChild(t),t.remove()}}();
         </script>
-        <script async="" data-next-page="/withRouter" src="/_next/static/V57Inh7FhDPLqpT5fIT1V/pages/withRouter.js"
+        <script async="" data-next-page="/withRouter" src="/_next/static/6cm3GMFkQmlpYbATXnDRE/pages/withRouter.js"
         crossorigin="anonymous" nomodule=""></script>
-        <script async="" data-next-page="/withRouter" src="/_next/static/V57Inh7FhDPLqpT5fIT1V/pages/withRouter.module.js"
+        <script async="" data-next-page="/withRouter" src="/_next/static/6cm3GMFkQmlpYbATXnDRE/pages/withRouter.module.js"
         crossorigin="anonymous" type="module"></script>
-        <script async="" data-next-page="/_app" src="/_next/static/V57Inh7FhDPLqpT5fIT1V/pages/_app.js"
+        <script async="" data-next-page="/_app" src="/_next/static/6cm3GMFkQmlpYbATXnDRE/pages/_app.js"
         crossorigin="anonymous" nomodule=""></script>
-        <script async="" data-next-page="/_app" src="/_next/static/V57Inh7FhDPLqpT5fIT1V/pages/_app.module.js"
+        <script async="" data-next-page="/_app" src="/_next/static/6cm3GMFkQmlpYbATXnDRE/pages/_app.module.js"
         crossorigin="anonymous" type="module"></script>
         <script src="/_next/static/runtime/webpack-a470c2a25bcb4d5a8ec0.js"
         async="" crossorigin="anonymous" nomodule=""></script>
@@ -48,19 +48,19 @@
         async="" crossorigin="anonymous" nomodule=""></script>
         <script src="/_next/static/chunks/framework.cdb73e402d876d4ac87f.module.js"
         async="" crossorigin="anonymous" type="module"></script>
-        <script src="/_next/static/chunks/8c874e6432cc280a7a4f4bb5c9a34ab58459d223.155621535702fe040780.js"
+        <script src="/_next/static/chunks/228e1f4e893fa3baf19d35d232c5645368446558.155621535702fe040780.js"
         async="" crossorigin="anonymous" nomodule=""></script>
-        <script src="/_next/static/chunks/538929eb098d29bd8795a8d91b62f85c2cd70180.b3f63bf01308f3d17f5c.js"
+        <script src="/_next/static/chunks/9c55f52966eec015ca752d895b72be32ded85f1c.b3f63bf01308f3d17f5c.js"
         async="" crossorigin="anonymous" nomodule=""></script>
-        <script src="/_next/static/chunks/538929eb098d29bd8795a8d91b62f85c2cd70180.85e4c18b9e4b400e5496.module.js"
+        <script src="/_next/static/chunks/9c55f52966eec015ca752d895b72be32ded85f1c.85e4c18b9e4b400e5496.module.js"
         async="" crossorigin="anonymous" type="module"></script>
         <script src="/_next/static/runtime/main-26e9253859bbcb659328.js"
         async="" crossorigin="anonymous" nomodule=""></script>
         <script src="/_next/static/runtime/main-e3367c6cc0a826287f74.module.js"
         async="" crossorigin="anonymous" type="module"></script>
-        <script src="/_next/static/V57Inh7FhDPLqpT5fIT1V/_buildManifest.js"
+        <script src="/_next/static/6cm3GMFkQmlpYbATXnDRE/_buildManifest.js"
         async="" crossorigin="anonymous" nomodule=""></script>
-        <script src="/_next/static/V57Inh7FhDPLqpT5fIT1V/_buildManifest.module.js"
+        <script src="/_next/static/6cm3GMFkQmlpYbATXnDRE/_buildManifest.module.js"
         async="" crossorigin="anonymous" type="module"></script>
     </body>

Serverless Mode (Decrease detected ✓)
General Overall decrease ✓
zeit/next.js canary arcanis/next.js mael/pnp-externals Change
buildDuration 23s 22.5s -581ms
nodeModulesSize 42.4 MB 42.4 MB -20.1 kB
Client Bundles (main, webpack, commons)
zeit/next.js canary arcanis/next.js mael/pnp-externals Change
main-HASH.js 18.2 kB 18.2 kB
main-HASH.js gzip 6.64 kB 6.64 kB
webpack-HASH.js 1.53 kB 1.53 kB
webpack-HASH.js gzip 746 B 746 B
611facb4dc25..799a4e38e.js 43.1 kB N/A N/A
611facb4dc25..e38e.js gzip 15.4 kB N/A N/A
c5165a51f6af..2b8407376.js 21.9 kB N/A N/A
c5165a51f6af..7376.js gzip 7.81 kB N/A N/A
framework.5b..dbaff70d3.js 125 kB 125 kB
framework.5b..70d3.js gzip 39.4 kB 39.4 kB
37abfcf6d75f..799a4e38e.js N/A 43.1 kB N/A
37abfcf6d75f..e38e.js gzip N/A 15.4 kB N/A
930e107a26d2..2b8407376.js N/A 21.9 kB N/A
930e107a26d2..7376.js gzip N/A 7.81 kB N/A
Overall change 210 kB 210 kB
Client Bundles (main, webpack, commons) Modern
zeit/next.js canary arcanis/next.js mael/pnp-externals Change
main-HASH.module.js 16.6 kB 16.6 kB
main-HASH.module.js gzip 6.38 kB 6.38 kB
webpack-HASH.module.js 1.53 kB 1.53 kB
webpack-HASH..dule.js gzip 746 B 746 B
611facb4dc25..f0.module.js 45.5 kB N/A N/A
611facb4dc25..dule.js gzip 16.5 kB N/A N/A
framework.5b..d3.module.js 125 kB 125 kB
framework.5b..dule.js gzip 39.4 kB 39.4 kB
37abfcf6d75f..f0.module.js N/A 45.5 kB N/A
37abfcf6d75f..dule.js gzip N/A 16.5 kB N/A
Overall change 189 kB 189 kB
Client Pages
zeit/next.js canary arcanis/next.js mael/pnp-externals Change
_app.js 1.83 kB 1.83 kB
_app.js gzip 883 B 883 B
_error.js 12.1 kB 12.1 kB
_error.js gzip 4.74 kB 4.74 kB
hooks.js 12.7 kB 12.7 kB
hooks.js gzip 4.81 kB 4.81 kB
index.js 343 B 343 B
index.js gzip 237 B 237 B
link.js 8.14 kB 8.14 kB
link.js gzip 3.49 kB 3.49 kB
routerDirect.js 433 B 433 B
routerDirect.js gzip 296 B 296 B
withRouter.js 444 B 444 B
withRouter.js gzip 294 B 294 B
Overall change 36 kB 36 kB
Client Pages Modern
zeit/next.js canary arcanis/next.js mael/pnp-externals Change
_app.module.js 1.73 kB 1.73 kB
_app.module.js gzip 841 B 841 B
_error.module.js 23.3 kB 23.3 kB
_error.module.js gzip 8.6 kB 8.6 kB
hooks.module.js 1.55 kB 1.55 kB
hooks.module.js gzip 804 B 804 B
index.module.js 319 B 319 B
index.module.js gzip 238 B 238 B
link.module.js 8.52 kB 8.52 kB
link.module.js gzip 3.67 kB 3.67 kB
routerDirect.module.js 419 B 419 B
routerDirect..dule.js gzip 294 B 294 B
withRouter.module.js 429 B 429 B
withRouter.m..dule.js gzip 293 B 293 B
Overall change 36.2 kB 36.2 kB
Client Build Manifests
zeit/next.js canary arcanis/next.js mael/pnp-externals Change
_buildManifest.js 81 B 81 B
_buildManifest.js gzip 61 B 61 B
_buildManifest.module.js 81 B 81 B
_buildManife..dule.js gzip 61 B 61 B
Overall change 162 B 162 B
Serverless bundles
zeit/next.js canary arcanis/next.js mael/pnp-externals Change
_error.js 247 kB 247 kB
_error.js gzip 66.2 kB 66.1 kB -7 B
hooks.html 3.86 kB 3.86 kB
hooks.html gzip 986 B 985 B -1 B
index.js 248 kB 248 kB
index.js gzip 66.5 kB 66.5 kB
link.js 255 kB 255 kB
link.js gzip 68.6 kB 68.6 kB ⚠️ +13 B
routerDirect.js 249 kB 249 kB
routerDirect.js gzip 66.5 kB 66.5 kB -33 B
withRouter.js 249 kB 249 kB
withRouter.js gzip 66.5 kB 66.5 kB ⚠️ +10 B
Overall change 1.25 MB 1.25 MB

@Timer
Copy link
Member

Timer commented Sep 8, 2019

because it will be resolvable from the basedir

I'm not sure this was intentional, it's probably meant to use webpack's passed context.

@Timer
Copy link
Member

Timer commented Sep 8, 2019

Let's see what happens: #8669

@Timer Timer added this to the 9.0.6 milestone Sep 8, 2019
Copy link
Member

@Timer Timer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm guessing this needs fixed everywhere we use the resolve module, e.g. verifyTypeScriptSetup.ts. Maybe we should export resolveFn as a generic helper so we can use it in both places?

@arcanis
Copy link
Contributor Author

arcanis commented Sep 8, 2019

Sounds a good idea - I've put it in next/lib/resolve-request and updated verifyTypeScriptSetup to use it 👍

packages/next/lib/resolve-request.ts Outdated Show resolved Hide resolved
arcanis and others added 2 commits September 9, 2019 17:31
Co-Authored-By: Joe Haddad <joe.haddad@zeit.co>
Copy link
Member

@Timer Timer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, thanks! As normal with these, we'll rely on Yarn's tests for PnP compat but will add our own shortly.

@Timer Timer merged commit 9fa8baa into vercel:canary Sep 9, 2019
@arcanis arcanis deleted the mael/pnp-externals branch September 13, 2019 10:39
@octogonz octogonz mentioned this pull request Aug 22, 2020
@vercel vercel locked as resolved and limited conversation to collaborators Feb 1, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PnP breaks the externals detection
3 participants