-
-
Notifications
You must be signed in to change notification settings - Fork 247
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
Comments
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? |
Thanks a lot, I'll keep an eye on the issue! |
Had a similar problem with nextjs 14. next/fonts would overwrite the first call to the document with the fonts. This did not show up on local testing, just when deployed to vercel. Our solution was to stop using next/fonts |
I was reporting this issue. you could reproduce this error with
What I am using? Next Font and Next Intl, I am not sure what library is doing the overwriting localFont localFont Mmmm it seems like a Next Font issue, I think that you set this header on Middleware and Next is overwriting it on page execution |
There are currently two issues open for the same topic, I'll close this in favor of #1442. I noticed also |
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
Mandatory reproduction URL
https://github.com/zenzen-sol/next-reproduction-template/tree/sol/repro-001-next-15-broken
Reproduction description
Steps to reproduce:
pnpm run dev
http://localhost:3000
in a browser.✅ OK(Next 14): https://github.com/zenzen-sol/next-reproduction-template/tree/sol/repro-001-Next-14-working
🙅🏻Broken (Next 15rc + next/font): https://github.com/zenzen-sol/next-reproduction-template/tree/sol/repro-001-next-15-broken
✅ OK (Next 15rc without next/font): https://github.com/zenzen-sol/next-reproduction-template/tree/sol/repro-001-next-15-working
Expected behaviour
Both the
next-intl
andnext/font
links should be present in the response header.The text was updated successfully, but these errors were encountered: