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
-
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.json
has data (some local props)data.json
is nullgetDataHref
condition 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.json
to be truthy before setting the value todata.dataHref
data.dataHref
can exist withoutdata.json
existingShould this code instead look something like:
I am not sure why we would be checking for
data.json
when setting thedataHref
variables instead of just checking for thedata.dataHref
and setting it if it exist, else fetch it.Beta Was this translation helpful? Give feedback.
All reactions