-
Notifications
You must be signed in to change notification settings - Fork 29.2k
Description
When a page is exported at build time from either the automatic static optimization or from leveraging getStaticProps
the asPath
will initially be the pathname
since it is the information we have for what the URL should be when visiting the page.
On the client we currently delay updating the asPath
for dynamic pages that leverage the automatic static optimization to prevent a hydration mismatch. We should investigate applying this behavior for all build-time exported pages since they can all encounter a hydration mismatch if rewritten to using the rewrites feature and asPath
is used while rendering the page.
Original issue opened here #17113 which was initially thought to be related to GS(S)P asPath
resolving but is not since the reproduction provided only leverages pages that are automatically statically optimized without GS(S)P methods.