CSS prioritization differs between next dev --turbopack and next build --turbopack #86703
GlebKodrik
started this conversation in
Turbopack Error Report
Replies: 0 comments
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.
-
Link to the code that reproduces this issue
https://github.com/GlebKodrik/turbopack-style/
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.
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.
I’ve minimized the code a lot, so now it’s much easier to understand what’s going on. Please pay special attention to the page.
Reproduction link: http://localhost:3000/intensive
We are working with (pages).
If I delete the course page, the bug occurs.
If I move the block into the parent (page), the bug occurs.
Same thing with the intensive (page).
If I delete , the bug occurs.
If I move the content of directly into page, the bug also occurs.
Additional
If I delete a component that is not used anywhere at all (), the bug still occurs
Something very strange is happening here.
Beta Was this translation helpful? Give feedback.
All reactions