next-intl icon indicating copy to clipboard operation
next-intl copied to clipboard

NextJS 15's `next/font` breaks alternate header injection.

Open zenzen-sol opened this issue 6 months ago β€’ 4 comments

Description

I notice that in the NextJS 15 release candidate, the "alternate" links that should appear in the response header are missing if next/font is used to optimize fonts. I'm not sure whether this issue belongs to NextJS or next-intl.

Verifications

  • [X] I've verified that the problem I'm experiencing isn't covered in the docs.
  • [X] I've searched for similar, existing issues on GitHub and Stack Overflow.
  • [X] I've compared my app to a working example to look for differences.

Mandatory reproduction URL

https://github.com/zenzen-sol/next-reproduction-template/tree/sol/repro-001-next-15-broken

Reproduction description

Steps to reproduce:

  1. Open reproduction
  2. Run pnpm run dev
  3. Reload http://localhost:3000 in a browser.
  4. Check the response header links in dev tools.

βœ… OK(Next 14): https://github.com/zenzen-sol/next-reproduction-template/tree/sol/repro-001-Next-14-working

CleanShot 2024-08-16 at 16 44 36@2x


πŸ™…πŸ»Broken (Next 15rc + next/font): https://github.com/zenzen-sol/next-reproduction-template/tree/sol/repro-001-next-15-broken

CleanShot 2024-08-16 at 16 45 25@2x


βœ… OK (Next 15rc without next/font): https://github.com/zenzen-sol/next-reproduction-template/tree/sol/repro-001-next-15-working

CleanShot 2024-08-16 at 16 46 20@2x

Expected behaviour

Both the next-intl and next/font links should be present in the response header.

zenzen-sol avatar Aug 16 '24 07:08 zenzen-sol