next.js
9d7f54c1 - Fix the build manifest path for `/` (#54744)

Commit
2 years ago
Fix the build manifest path for `/` (#54744) ### What? Fixes a bug introduced in #54668, where the `/` path would map to the build manifest `.next/server/page/app-build-manifest.json` in App router instead of the correct `.next/server/index/page/app-build-manifest.json` It also addresses an issue where `not-found` manifests would map to `.next/server/not-found/app-build-manifest.json` instead of the correct `.next/server/not-found/page/app-build-manifest.json`. ### Why? The `&& type === 'pages'` mean we only rewrote `/` to `/index` in Pages router, where it needs to apply to both App and Pages. Likewise, special-casing `not-found` led to it not finding the manifest. ### How? Duplicate the logic from https://github.com/vercel/next.js/blob/d3a107991cd5950b06cc4bcd97a045f584a433e3/packages/next-swc/crates/next-core/src/util.rs#L65-L76 Closes WEB-1471 Co-authored-by: Will Binns-Smith <755844+wbinnssmith@users.noreply.github.com>
Author
Parents
Loading