Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
3 tasks done
Tracked by #1089
zenzen-sol opened this issue Aug 16, 2024 · 3 comments
Open
3 tasks done
Tracked by #1089

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

zenzen-sol opened this issue Aug 16, 2024 · 3 comments
Labels
bug Something isn't working upstream-issue This issue is caused by an upstream dependency (e.g. Next.js)

Comments

@zenzen-sol
Copy link

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

  • I've verified that the problem I'm experiencing isn't covered in the docs.
  • I've searched for similar, existing issues on GitHub and Stack Overflow.
  • 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 zenzen-sol added bug Something isn't working unconfirmed Needs triage. labels Aug 16, 2024
@amannn
Copy link
Owner

amannn commented Aug 16, 2024

Many thanks for the thoughtful bug report and reproduction! Do you think you could report this upstream in the Next.js repo? Seems like this is something to be addressed there. If you do, can you leave a link here so we can track the upstream issue?

@amannn amannn added the upstream-issue This issue is caused by an upstream dependency (e.g. Next.js) label Aug 16, 2024
@zenzen-sol
Copy link
Author

@amannn Thanks. The upstream issue is here.

@amannn
Copy link
Owner

amannn commented Aug 20, 2024

Thanks a lot, I'll keep an eye on the issue!

@amannn amannn removed the unconfirmed Needs triage. label Aug 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working upstream-issue This issue is caused by an upstream dependency (e.g. Next.js)
Projects
None yet
Development

No branches or pull requests

2 participants