mirror of
https://github.com/hanzoai/next.js.git
synced 2026-09-24 17:00:51 +00:00
When `patchFetch` is applied at during `buildAppStaticPaths` ([ref](https://github.com/vercel/next.js/blob/030021234b288638aa1d971c9e051dea5de950b6/packages/next/src/build/utils.ts#L1253-L1256)), it's done so without any context of the bundled React runtime. Since `patchFetch` will potentially postpone during static generation with PPR, it needs to be using the correct React version, otherwise `unstable_postpone` won't be available e.g. in the case of a page utilizing `generateStaticParams`. This moves `patchFetch` into the bundled runtime so that it has the correct version of React when invoked.