nextjs - 💡(How to fix) Fix next/google font in Next 16 with inlineCss: true breaks the font in prod [2 comments, 3 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
vercel/next.js#85148Fetched 2026-04-08 02:17:17
View on GitHub
Comments
2
Participants
3
Timeline
7
Reactions
0
Author
Timeline (top)
commented ×2labeled ×2closed ×1issue_type_added ×1

Code Example

Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 24.4.0: Fri Apr 11 18:32:50 PDT 2025; root:xnu-11417.101.15~117/RELEASE_ARM64_T6041
  Available memory (MB): 49152
  Available CPU cores: 16
Binaries:
  Node: 22.20.0
  npm: 10.9.3
  Yarn: N/A
  pnpm: 10.18.3
Relevant Packages:
  next: 16.0.0-canary.16 // Latest available version is detected (16.0.0-canary.16).
  eslint-config-next: N/A
  react: 19.1.0
  react-dom: 19.1.0
  typescript: 5.9.3
Next.js Config:
  output: N/A
RAW_BUFFERClick to expand / collapse

Link to the code that reproduces this issue

https://github.com/polnikale/nextjs-fonts-inlinecss/tree/main/app

To Reproduce

  1. npm run build, npm run start

Here you can see that the font is not actually inter, and there's an extra request made not to /next/_media/font.css, but to font.css

  1. npm run dev -> works just fine
  2. remove inlineCss, npm run build, npm run start -> works just fine

Current vs. Expected behavior

The font should be load

Provide environment information

Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 24.4.0: Fri Apr 11 18:32:50 PDT 2025; root:xnu-11417.101.15~117/RELEASE_ARM64_T6041
  Available memory (MB): 49152
  Available CPU cores: 16
Binaries:
  Node: 22.20.0
  npm: 10.9.3
  Yarn: N/A
  pnpm: 10.18.3
Relevant Packages:
  next: 16.0.0-canary.16 // Latest available version is detected (16.0.0-canary.16).
  eslint-config-next: N/A
  react: 19.1.0
  react-dom: 19.1.0
  typescript: 5.9.3
Next.js Config:
  output: N/A

Which area(s) are affected? (Select all that apply)

Font (next/font)

Which stage(s) are affected? (Select all that apply)

next build (local), next start (local), Vercel (Deployed)

Additional context

No response

extent analysis

TL;DR

Removing the inlineCss option may resolve the font loading issue in production.

Guidance

  • The issue seems to be related to the inlineCss option in the Next.js configuration, as removing it resolves the issue.
  • Try removing the inlineCss option and then run npm run build and npm run start to verify if the font loads correctly.
  • The fact that npm run dev works fine suggests that the issue is specific to the production build.
  • Investigate the differences in the build process between development and production to identify potential causes.

Example

No code snippet is provided as the issue is more related to configuration and build process.

Notes

The provided information suggests that the issue is related to the inlineCss option, but the exact cause is still unclear. Further investigation into the build process and configuration is needed to identify the root cause.

Recommendation

Apply workaround: Remove the inlineCss option, as it has been shown to resolve the issue in the provided example.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING