Prefetching issues with middleware rewriting URL's with base path #1427
Replies: 1 comment 1 reply
-
|
Hey @austintreneff maybe you could redirect this question to Vercel Devs. I don't think we will be able to shine much light here since this is next.js internals. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Looking at the router code here: https://github.com/vercel/next.js/blob/6fd866bfd7d4377f5574aa1710eb89343ffad8bb/packages/next/src/shared/lib/router/router.ts#L2445 I am noticing some differences between my local next start versus what is happening when deployed to Vercel.
Background:
next start),data.jsonhas data (some local props)data.jsonis nullgetDataHrefcondition to run which is where things go wrong (my base path is included twice in the new href)My question:
Why is this code checking for
data.jsonto be truthy before setting the value todata.dataHrefdata.dataHrefcan exist withoutdata.jsonexistingShould this code instead look something like:
I am not sure why we would be checking for
data.jsonwhen setting thedataHrefvariables instead of just checking for thedata.dataHrefand setting it if it exist, else fetch it.Beta Was this translation helpful? Give feedback.
All reactions