Fix chunk file names in flight manifest (#48583)
This PR corrects the file names of chunks in the flight manifest. Previously we assume that the chunk file is always named as `(requiredChunk.name || requiredChunk.id) + '-' + requiredChunk.hash` and located in `static/chunks`. This isn't always true (see the comment) especially when a chunk was generated via `import()`. Another mistake was that we assume that one chunk only generates one file, but it's actually possible that it depends on multiple files. This should address many of the "Chunk failed to load" errors. Closes [#47173](https://github.com/vercel/next.js/issues/47173), fixes NEXT-847 fix #47173
Showing
Please
register
or
sign in
to comment