-
Notifications
You must be signed in to change notification settings - Fork 28.9k
Labels
Font (next/font)Related to Next.js Font Optimization.Related to Next.js Font Optimization.TurbopackRelated to Turbopack with Next.js.Related to Turbopack with Next.js.linear: turbopackConfirmed issue that is tracked by the Turbopack team.Confirmed issue that is tracked by the Turbopack team.
Description
Link to the code that reproduces this issue
https://github.com/stefanprobst/issue-next-turbo-fonts
To Reproduce
- clone repo,
pnpm install
pnpm build
(which runsnext build --turbopack
) andpnpm start
(which runsnext start --turbopack
)- open http://localhost:3000 and inspect the
<h1>
which does not have "Geist" font family applied - for comparison, inspect the h1 after running either
pnpm 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. - NOTE: when
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)
TaskManagerOL, vidyesh95, Arctomachine, icflorescu, colexbruhn and 2 more
Metadata
Metadata
Assignees
Labels
Font (next/font)Related to Next.js Font Optimization.Related to Next.js Font Optimization.TurbopackRelated to Turbopack with Next.js.Related to Turbopack with Next.js.linear: turbopackConfirmed issue that is tracked by the Turbopack team.Confirmed issue that is tracked by the Turbopack team.