local font produces duplicate font familly #76301
Unanswered
cbou
asked this question in
App Router
Replies: 1 comment
-
Not sure I agree with this not being intuitive. 🤔 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Link to the code that reproduces this issue
https://github.com/cbou/next-local-font-duplicate-family
To Reproduce
npx create-next-app@latestsrc/appcalled font.ts and font2.tsnpm run devCurrent vs. Expected behavior
You will see two output in the console. Both with the same fontFamily.
Expected:
The font family IDs should be for each call of localFont different or at least configureable.
Provide environment information
Operating System: Platform: darwin Arch: arm64 Version: Darwin Kernel Version 24.3.0: Thu Jan 2 20:24:16 PST 2025; root:xnu-11215.81.4~3/RELEASE_ARM64_T6000 Available memory (MB): 16384 Available CPU cores: 10 Binaries: Node: 22.11.0 npm: 10.9.0 Yarn: N/A pnpm: 8.14.1 Relevant Packages: next: 15.1.7 // Latest available version is detected (15.1.7). eslint-config-next: 15.1.7 react: 19.0.0 react-dom: 19.0.0 typescript: 5.7.3 Next.js Config: output: N/AWhich area(s) are affected? (Select all that apply)
create-next-app
Which stage(s) are affected? (Select all that apply)
next dev (local)
Additional context
This issue can be mitigated by using different variable name. e.g.
const font = ...andconst font2 = .... Still this is not intuitive.Beta Was this translation helpful? Give feedback.
All reactions