You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(nextjs): Avoid wrapping middleware files when in standalone mode (#18172)
This PR attempts to fix#18001 by not wrapping the middleware files if
Next.js 16 is the current version and is in standalone output mode which
is the problematic scenario.
Investigation:
- Next.js renames `proxy` to `middleware` under the hood.
- By wrapping the middleware a `proxy.js` entry is produced in
`middleware.js.nft.json` which wouldn't be there otherwise, meaning if
we don't wrap it then that entry doesn't get produced. So it seems like
`@vercel/nft` is somehow adding the `proxy` file as a dependency of
itself which fails to copy to the output directory because it was
already copied and renamed to `proxy.js` or at least that is what I'm
guessing is happening.
0 commit comments