-
Notifications
You must be signed in to change notification settings - Fork 29.9k
Description
Link to the code that reproduces this issue
https://github.com/SashaPolyanski/next-turbopack-style
To Reproduce
Use route my project with problem: http://localhost:3000/intensive or https://next-turbopack-style-edr3.vercel.app/intensive
To Reproduce
-
Run the app in development with next dev --turbopack
→ Styles load correctly, no issues observed. -
Build the app with next build --turbopack and then start with next start
→ Styles are applied in a different priority/order compared to dev mode.
Notes:
- The issue reproduces 100% on our current setup.
- Sometimes deleting the pages folder or a random component in entities makes the bug disappear, which makes the behavior unpredictable.
Current vs. Expected behavior
- Current: In production (next build --turbopack + next start), CSS order/priority differs from development, breaking the layout.
- Expected: Style prioritization should be consistent between dev and build modes when using Turbopack.
Provide environment information
Operating System:
Platform: darwin
Arch: arm64
Version: Darwin Kernel Version 23.6.0
Binaries:
Node: 20.9.0
npm: 10.8.2
Relevant Packages:
next: 15.6.0-canary.12
Next.js Config:
output: N/AWhich area(s) are affected? (Select all that apply)
Turbopack
Which stage(s) are affected? (Select all that apply)
next build (local)
Additional context
Happens locally with next build --turbopack → next start.
Cannot reproduce when running next dev --turbopack.
Issue sometimes disappears after removing a random folder/component, which suggests non-deterministic style bundling.
1 image - next dev --turbopack
2 image next build --turbopack → next start
