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 data URL with root-catchall and basePath #16263

Merged
merged 3 commits into from
Aug 17, 2020

Conversation

ijjk
Copy link
Member

@ijjk ijjk commented Aug 17, 2020

This fixes the incorrect /_next/data URL being generated on client transition due to the as value passed to getRouteInfo having the basePath which is used while interpolating the values for dynamic routes, specifically root catch-all routes. A regression test has also been added to ensure this is working

Closes: #15747

@ijjk
Copy link
Member Author

ijjk commented Aug 17, 2020

Stats from current PR

Default Server Mode (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary ijjk/next.js fix/root-catch-all-data-url Change
buildDuration 12.9s 13.5s ⚠️ +683ms
nodeModulesSize 57.6 MB 57.6 MB ⚠️ +43 B
Page Load Tests Overall increase ✓
vercel/next.js canary ijjk/next.js fix/root-catch-all-data-url Change
/ failed reqs 0 0
/ total time (seconds) 2.498 2.485 -0.01
/ avg req/sec 1000.71 1006.21 +5.5
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.491 1.462 -0.03
/error-in-render avg req/sec 1677.26 1710.43 +33.17
Client Bundles (main, webpack, commons) Overall increase ⚠️
vercel/next.js canary ijjk/next.js fix/root-catch-all-data-url Change
677f882d2ed8..2585.js gzip 10.2 kB 10.2 kB ⚠️ +2 B
framework.HASH.js gzip 39 kB 39 kB
main-8c9d3f7..4367.js gzip 6.72 kB 6.72 kB
webpack-e067..f178.js gzip 751 B 751 B
Overall change 56.7 kB 56.7 kB ⚠️ +2 B
Client Bundles (main, webpack, commons) Modern Overall increase ⚠️
vercel/next.js canary ijjk/next.js fix/root-catch-all-data-url Change
677f882d2ed8..dule.js gzip 6.07 kB 6.08 kB ⚠️ +2 B
framework.HA..dule.js gzip 39 kB 39 kB
main-e89c24f..dule.js gzip 5.79 kB 5.79 kB
webpack-07c5..dule.js gzip 751 B 751 B
Overall change 51.6 kB 51.6 kB ⚠️ +2 B
Legacy Client Bundles (polyfills)
vercel/next.js canary ijjk/next.js fix/root-catch-all-data-url Change
polyfills-4b..e242.js gzip 31 kB 31 kB
Overall change 31 kB 31 kB
Client Pages
vercel/next.js canary ijjk/next.js fix/root-catch-all-data-url Change
_app-9a0b9e1..b37e.js gzip 1.28 kB 1.28 kB
_error-1464c..a26f.js gzip 3.44 kB 3.44 kB
hooks-89731c..c609.js gzip 887 B 887 B
index-17468f..5d83.js gzip 227 B 227 B
link-00b8972..6e4e.js gzip 1.3 kB 1.3 kB
routerDirect..924c.js gzip 284 B 284 B
withRouter-7..c13d.js gzip 284 B 284 B
Overall change 7.7 kB 7.7 kB
Client Pages Modern
vercel/next.js canary ijjk/next.js fix/root-catch-all-data-url Change
_app-75d3a82..dule.js gzip 625 B 625 B
_error-e550f..dule.js gzip 2.29 kB 2.29 kB
hooks-cbf13f..dule.js gzip 387 B 387 B
index-b9a643..dule.js gzip 226 B 226 B
link-72c64d9..dule.js gzip 1.27 kB 1.27 kB
routerDirect..dule.js gzip 284 B 284 B
withRouter-f..dule.js gzip 282 B 282 B
Overall change 5.36 kB 5.36 kB
Client Build Manifests
vercel/next.js canary ijjk/next.js fix/root-catch-all-data-url Change
_buildManifest.js gzip 322 B 322 B
_buildManife..dule.js gzip 330 B 330 B
Overall change 652 B 652 B
Rendered Page Sizes Overall increase ⚠️
vercel/next.js canary ijjk/next.js fix/root-catch-all-data-url Change
index.html gzip 947 B 948 B ⚠️ +1 B
link.html gzip 953 B 953 B
withRouter.html gzip 940 B 941 B ⚠️ +1 B
Overall change 2.84 kB 2.84 kB ⚠️ +2 B

Diffs

Diff for 677f882d2ed8..3c.module.js
@@ -1178,7 +1178,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
                   pathname,
                   query
                 }),
-                as,
+                delBasePath(as),
                 __N_SSG
               );
             }
Diff for 677f882d2ed8..846419646.js
@@ -1630,7 +1630,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
                                   pathname: pathname,
                                   query: query
                                 }),
-                                as,
+                                delBasePath(as),
                                 __N_SSG
                               );
                             }
Diff for index.html
@@ -24,7 +24,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.5020e365fe246cfb523c.module.js"
+      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.897f5e72583be4f5895d.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -117,13 +117,13 @@
       type="module"
     ></script>
     <script
-      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.c4ee795a228846419646.js"
+      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.fedf4a6cbf46e2c5bf9e.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.5020e365fe246cfb523c.module.js"
+      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.897f5e72583be4f5895d.module.js"
       async=""
       crossorigin="anonymous"
       type="module"
Diff for link.html
@@ -24,7 +24,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.5020e365fe246cfb523c.module.js"
+      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.897f5e72583be4f5895d.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -122,13 +122,13 @@
       type="module"
     ></script>
     <script
-      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.c4ee795a228846419646.js"
+      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.fedf4a6cbf46e2c5bf9e.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.5020e365fe246cfb523c.module.js"
+      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.897f5e72583be4f5895d.module.js"
       async=""
       crossorigin="anonymous"
       type="module"
Diff for withRouter.html
@@ -24,7 +24,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.5020e365fe246cfb523c.module.js"
+      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.897f5e72583be4f5895d.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -117,13 +117,13 @@
       type="module"
     ></script>
     <script
-      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.c4ee795a228846419646.js"
+      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.fedf4a6cbf46e2c5bf9e.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.5020e365fe246cfb523c.module.js"
+      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.897f5e72583be4f5895d.module.js"
       async=""
       crossorigin="anonymous"
       type="module"

Serverless Mode (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary ijjk/next.js fix/root-catch-all-data-url Change
buildDuration 15s 14.9s -77ms
nodeModulesSize 57.6 MB 57.6 MB ⚠️ +43 B
Client Bundles (main, webpack, commons) Overall increase ⚠️
vercel/next.js canary ijjk/next.js fix/root-catch-all-data-url Change
677f882d2ed8..2585.js gzip 10.2 kB N/A N/A
framework.HASH.js gzip 39 kB 39 kB
main-8c9d3f7..4367.js gzip 6.72 kB 6.72 kB
webpack-e067..f178.js gzip 751 B 751 B
677f882d2ed8..b4e6.js gzip N/A 10.2 kB N/A
Overall change 56.7 kB 56.7 kB ⚠️ +2 B
Client Bundles (main, webpack, commons) Modern Overall increase ⚠️
vercel/next.js canary ijjk/next.js fix/root-catch-all-data-url Change
677f882d2ed8..dule.js gzip 6.07 kB N/A N/A
framework.HA..dule.js gzip 39 kB 39 kB
main-e89c24f..dule.js gzip 5.79 kB 5.79 kB
webpack-07c5..dule.js gzip 751 B 751 B
677f882d2ed8..dule.js gzip N/A 6.08 kB N/A
Overall change 51.6 kB 51.6 kB ⚠️ +2 B
Legacy Client Bundles (polyfills)
vercel/next.js canary ijjk/next.js fix/root-catch-all-data-url Change
polyfills-4b..e242.js gzip 31 kB 31 kB
Overall change 31 kB 31 kB
Client Pages
vercel/next.js canary ijjk/next.js fix/root-catch-all-data-url Change
_app-9a0b9e1..b37e.js gzip 1.28 kB 1.28 kB
_error-1464c..a26f.js gzip 3.44 kB 3.44 kB
hooks-89731c..c609.js gzip 887 B 887 B
index-17468f..5d83.js gzip 227 B 227 B
link-00b8972..6e4e.js gzip 1.3 kB 1.3 kB
routerDirect..924c.js gzip 284 B 284 B
withRouter-7..c13d.js gzip 284 B 284 B
Overall change 7.7 kB 7.7 kB
Client Pages Modern
vercel/next.js canary ijjk/next.js fix/root-catch-all-data-url Change
_app-75d3a82..dule.js gzip 625 B 625 B
_error-e550f..dule.js gzip 2.29 kB 2.29 kB
hooks-cbf13f..dule.js gzip 387 B 387 B
index-b9a643..dule.js gzip 226 B 226 B
link-72c64d9..dule.js gzip 1.27 kB 1.27 kB
routerDirect..dule.js gzip 284 B 284 B
withRouter-f..dule.js gzip 282 B 282 B
Overall change 5.36 kB 5.36 kB
Client Build Manifests
vercel/next.js canary ijjk/next.js fix/root-catch-all-data-url Change
_buildManifest.js gzip 322 B 322 B
_buildManife..dule.js gzip 330 B 330 B
Overall change 652 B 652 B
Serverless bundles Overall increase ⚠️
vercel/next.js canary ijjk/next.js fix/root-catch-all-data-url Change
_error.js 1.03 MB 1.03 MB
404.html 4.18 kB 4.18 kB
hooks.html 3.82 kB 3.82 kB
index.js 1.03 MB 1.03 MB
link.js 1.07 MB 1.07 MB ⚠️ +13 B
routerDirect.js 1.06 MB 1.06 MB ⚠️ +13 B
withRouter.js 1.06 MB 1.06 MB ⚠️ +13 B
Overall change 5.27 MB 5.27 MB ⚠️ +39 B
Commit: 0df8c2c

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.

s/poarts/parts/

How did the test pass with this typo?

image

@ijjk ijjk requested a review from Timer August 17, 2020 15:05
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.

LGTM

@ijjk
Copy link
Member Author

ijjk commented Aug 17, 2020

Stats from current PR

Default Server Mode (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary ijjk/next.js fix/root-catch-all-data-url Change
buildDuration 12s 12.2s ⚠️ +200ms
nodeModulesSize 57.6 MB 57.6 MB ⚠️ +43 B
Page Load Tests Overall increase ✓
vercel/next.js canary ijjk/next.js fix/root-catch-all-data-url Change
/ failed reqs 0 0
/ total time (seconds) 2.202 2.161 -0.04
/ avg req/sec 1135.55 1157.02 +21.47
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.187 1.186 0
/error-in-render avg req/sec 2105.52 2107.85 +2.33
Client Bundles (main, webpack, commons) Overall increase ⚠️
vercel/next.js canary ijjk/next.js fix/root-catch-all-data-url Change
677f882d2ed8..2585.js gzip 10.2 kB 10.2 kB ⚠️ +2 B
framework.HASH.js gzip 39 kB 39 kB
main-8c9d3f7..4367.js gzip 6.72 kB 6.72 kB
webpack-e067..f178.js gzip 751 B 751 B
Overall change 56.7 kB 56.7 kB ⚠️ +2 B
Client Bundles (main, webpack, commons) Modern Overall increase ⚠️
vercel/next.js canary ijjk/next.js fix/root-catch-all-data-url Change
677f882d2ed8..dule.js gzip 6.07 kB 6.08 kB ⚠️ +2 B
framework.HA..dule.js gzip 39 kB 39 kB
main-e89c24f..dule.js gzip 5.79 kB 5.79 kB
webpack-07c5..dule.js gzip 751 B 751 B
Overall change 51.6 kB 51.6 kB ⚠️ +2 B
Legacy Client Bundles (polyfills)
vercel/next.js canary ijjk/next.js fix/root-catch-all-data-url Change
polyfills-4b..e242.js gzip 31 kB 31 kB
Overall change 31 kB 31 kB
Client Pages
vercel/next.js canary ijjk/next.js fix/root-catch-all-data-url Change
_app-9a0b9e1..b37e.js gzip 1.28 kB 1.28 kB
_error-1464c..a26f.js gzip 3.44 kB 3.44 kB
hooks-89731c..c609.js gzip 887 B 887 B
index-17468f..5d83.js gzip 227 B 227 B
link-00b8972..6e4e.js gzip 1.3 kB 1.3 kB
routerDirect..924c.js gzip 284 B 284 B
withRouter-7..c13d.js gzip 284 B 284 B
Overall change 7.7 kB 7.7 kB
Client Pages Modern
vercel/next.js canary ijjk/next.js fix/root-catch-all-data-url Change
_app-75d3a82..dule.js gzip 625 B 625 B
_error-e550f..dule.js gzip 2.29 kB 2.29 kB
hooks-cbf13f..dule.js gzip 387 B 387 B
index-b9a643..dule.js gzip 226 B 226 B
link-72c64d9..dule.js gzip 1.27 kB 1.27 kB
routerDirect..dule.js gzip 284 B 284 B
withRouter-f..dule.js gzip 282 B 282 B
Overall change 5.36 kB 5.36 kB
Client Build Manifests
vercel/next.js canary ijjk/next.js fix/root-catch-all-data-url Change
_buildManifest.js gzip 322 B 322 B
_buildManife..dule.js gzip 330 B 330 B
Overall change 652 B 652 B
Rendered Page Sizes Overall increase ⚠️
vercel/next.js canary ijjk/next.js fix/root-catch-all-data-url Change
index.html gzip 947 B 948 B ⚠️ +1 B
link.html gzip 953 B 953 B
withRouter.html gzip 940 B 941 B ⚠️ +1 B
Overall change 2.84 kB 2.84 kB ⚠️ +2 B

Diffs

Diff for 677f882d2ed8..3c.module.js
@@ -1178,7 +1178,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
                   pathname,
                   query
                 }),
-                as,
+                delBasePath(as),
                 __N_SSG
               );
             }
Diff for 677f882d2ed8..846419646.js
@@ -1630,7 +1630,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
                                   pathname: pathname,
                                   query: query
                                 }),
-                                as,
+                                delBasePath(as),
                                 __N_SSG
                               );
                             }
Diff for index.html
@@ -24,7 +24,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.5020e365fe246cfb523c.module.js"
+      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.897f5e72583be4f5895d.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -117,13 +117,13 @@
       type="module"
     ></script>
     <script
-      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.c4ee795a228846419646.js"
+      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.fedf4a6cbf46e2c5bf9e.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.5020e365fe246cfb523c.module.js"
+      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.897f5e72583be4f5895d.module.js"
       async=""
       crossorigin="anonymous"
       type="module"
Diff for link.html
@@ -24,7 +24,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.5020e365fe246cfb523c.module.js"
+      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.897f5e72583be4f5895d.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -122,13 +122,13 @@
       type="module"
     ></script>
     <script
-      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.c4ee795a228846419646.js"
+      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.fedf4a6cbf46e2c5bf9e.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.5020e365fe246cfb523c.module.js"
+      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.897f5e72583be4f5895d.module.js"
       async=""
       crossorigin="anonymous"
       type="module"
Diff for withRouter.html
@@ -24,7 +24,7 @@
     />
     <link
       rel="preload"
-      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.5020e365fe246cfb523c.module.js"
+      href="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.897f5e72583be4f5895d.module.js"
       as="script"
       crossorigin="anonymous"
     />
@@ -117,13 +117,13 @@
       type="module"
     ></script>
     <script
-      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.c4ee795a228846419646.js"
+      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.fedf4a6cbf46e2c5bf9e.js"
       async=""
       crossorigin="anonymous"
       nomodule=""
     ></script>
     <script
-      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.5020e365fe246cfb523c.module.js"
+      src="/_next/static/chunks/677f882d2ed86fa3467b8979053c1a4c3f8bc4df.897f5e72583be4f5895d.module.js"
       async=""
       crossorigin="anonymous"
       type="module"

Serverless Mode (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary ijjk/next.js fix/root-catch-all-data-url Change
buildDuration 13.5s 13.4s -106ms
nodeModulesSize 57.6 MB 57.6 MB ⚠️ +43 B
Client Bundles (main, webpack, commons) Overall increase ⚠️
vercel/next.js canary ijjk/next.js fix/root-catch-all-data-url Change
677f882d2ed8..2585.js gzip 10.2 kB N/A N/A
framework.HASH.js gzip 39 kB 39 kB
main-8c9d3f7..4367.js gzip 6.72 kB 6.72 kB
webpack-e067..f178.js gzip 751 B 751 B
677f882d2ed8..b4e6.js gzip N/A 10.2 kB N/A
Overall change 56.7 kB 56.7 kB ⚠️ +2 B
Client Bundles (main, webpack, commons) Modern Overall increase ⚠️
vercel/next.js canary ijjk/next.js fix/root-catch-all-data-url Change
677f882d2ed8..dule.js gzip 6.07 kB N/A N/A
framework.HA..dule.js gzip 39 kB 39 kB
main-e89c24f..dule.js gzip 5.79 kB 5.79 kB
webpack-07c5..dule.js gzip 751 B 751 B
677f882d2ed8..dule.js gzip N/A 6.08 kB N/A
Overall change 51.6 kB 51.6 kB ⚠️ +2 B
Legacy Client Bundles (polyfills)
vercel/next.js canary ijjk/next.js fix/root-catch-all-data-url Change
polyfills-4b..e242.js gzip 31 kB 31 kB
Overall change 31 kB 31 kB
Client Pages
vercel/next.js canary ijjk/next.js fix/root-catch-all-data-url Change
_app-9a0b9e1..b37e.js gzip 1.28 kB 1.28 kB
_error-1464c..a26f.js gzip 3.44 kB 3.44 kB
hooks-89731c..c609.js gzip 887 B 887 B
index-17468f..5d83.js gzip 227 B 227 B
link-00b8972..6e4e.js gzip 1.3 kB 1.3 kB
routerDirect..924c.js gzip 284 B 284 B
withRouter-7..c13d.js gzip 284 B 284 B
Overall change 7.7 kB 7.7 kB
Client Pages Modern
vercel/next.js canary ijjk/next.js fix/root-catch-all-data-url Change
_app-75d3a82..dule.js gzip 625 B 625 B
_error-e550f..dule.js gzip 2.29 kB 2.29 kB
hooks-cbf13f..dule.js gzip 387 B 387 B
index-b9a643..dule.js gzip 226 B 226 B
link-72c64d9..dule.js gzip 1.27 kB 1.27 kB
routerDirect..dule.js gzip 284 B 284 B
withRouter-f..dule.js gzip 282 B 282 B
Overall change 5.36 kB 5.36 kB
Client Build Manifests
vercel/next.js canary ijjk/next.js fix/root-catch-all-data-url Change
_buildManifest.js gzip 322 B 322 B
_buildManife..dule.js gzip 330 B 330 B
Overall change 652 B 652 B
Serverless bundles Overall increase ⚠️
vercel/next.js canary ijjk/next.js fix/root-catch-all-data-url Change
_error.js 1.03 MB 1.03 MB
404.html 4.18 kB 4.18 kB
hooks.html 3.82 kB 3.82 kB
index.js 1.03 MB 1.03 MB
link.js 1.07 MB 1.07 MB ⚠️ +13 B
routerDirect.js 1.06 MB 1.06 MB ⚠️ +13 B
withRouter.js 1.06 MB 1.06 MB ⚠️ +13 B
Overall change 5.27 MB 5.27 MB ⚠️ +39 B
Commit: f55c8f9

@kodiakhq kodiakhq bot merged commit f8534a6 into vercel:canary Aug 17, 2020
m-lautenbach pushed a commit to m-lautenbach/next.js that referenced this pull request Aug 20, 2020
This fixes the incorrect `/_next/data` URL being generated on client transition due to the `as` value passed to `getRouteInfo` having the `basePath` which is used while interpolating the values for dynamic routes, specifically root catch-all routes. A regression test has also been added to ensure this is working

Closes: vercel#15747
@vercel vercel locked as resolved and limited conversation to collaborators Jan 30, 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.

Inconsistent url (prefetch/fetch) for .json data file on link click (next/link) when using SSG + basePath
2 participants