turbopack build does not correctly resolve fonts from next/fonts #77861
Labels
Font (next/font)
Related to Next.js Font Optimization.
linear: turbopack
Confirmed issue that is tracked by the Turbopack team.
Turbopack
Related to Turbopack with Next.js.
Link to the code that reproduces this issue
https://github.com/stefanprobst/issue-next-turbo-fonts
To Reproduce
pnpm install
pnpm build
(which runsnext build --turbopack
) andpnpm start
(which runsnext start --turbopack
)<h1>
which does not have "Geist" font family appliedpnpm dev
(which runsnext dev --turbopack
) or runpnpm build:webpack && pnpm start:webpack
- in all these cases the h1 has the correct "Geist" font-family applied.next/font
is not imported in thenot-found
page here it does work correctly with turbopack build as well.Current vs. Expected behavior
turbopack build should behave like webpack build/dev, and turbopack dev.
Provide environment information
Operating System: Platform: linux Arch: x64 Version: #202403151937 SMP PREEMPT_DYNAMIC Fri Mar 15 19:52:22 UTC 2024 Available memory (MB): 31401 Available CPU cores: 16 Binaries: Node: 22.14.0 npm: 10.9.2 Yarn: 1.22.22 pnpm: 10.6.2 Relevant Packages: next: 15.3.0-canary.38 // Latest available version is detected (15.3.0-canary.38). eslint-config-next: N/A react: 19.1.0 react-dom: 19.1.0 typescript: 5.8.3 Next.js Config: output: N/A
Which area(s) are affected? (Select all that apply)
Turbopack, Font (next/font)
Which stage(s) are affected? (Select all that apply)
next build (local)
The text was updated successfully, but these errors were encountered: