Root-Causing a Silent Turbopack + Tailwind v4 Bug — Fixed Upstream

AI Development · Open-source contribution

Disciplined, server-side debugging turned a no-error CSS failure into a public upstream contribution to Next.js.
Illustration of inspecting CSS code with a magnifier and contributing the fix upstream to a shared repository

Overview

While building an internal dashboard on Next.js, our engineering team hit a styling failure that every tool in the chain declared healthy. This case study covers how we root-caused it at the source, isolated a bundler bug rather than a bug in our code, and contributed the reproduction upstream to Next.js.

Technologies

  • Next.js with Turbopack (development server)
  • Tailwind CSS v4 with the @source directive
  • TypeScript, ESLint, unit tests and production builds as the existing quality gates

Services

  • Root-cause debugging
  • Toolchain verification
  • Open-source contribution

Challenge

The layout silently collapsed, twice, with no errors anywhere. Lint, type-checking, unit tests, and production builds were all green. Nothing in the codebase pointed to a cause, which meant every code-level check was reporting success while the running application said otherwise.

Solution

Instead of trusting the toolchain's all-clear, we verified what the dev server was actually serving: we requested the compiled CSS directly and searched it for the utility classes the UI depended on. They were missing from the output, even though the source was correct.

The root cause: Tailwind v4 classes pulled in via the @source directive were being dropped during Turbopack's incremental rebuilds. A development-only bundler bug, not a bug in our code, which is why every code-level check passed.

We documented a reliable remedy, wrote up a minimal reproduction, and contributed it upstream to Next.js (issue #93052).

Results

  • A confusing, no-error failure became a recognizable, documented pattern with a reliable remedy
  • A minimal reproduction contributed upstream to Next.js (vercel/next.js#93052), a public contribution to tools the wider community relies on
  • Zero changes made to application code that was never at fault

Why it matters

This is what disciplined, AI-era engineering looks like: when the tooling reports success but the result says otherwise, you verify reality at the source, isolate the true cause, and give the fix back to the ecosystem.

Let's build yours

Chasing a failure your tools insist isn't there? Talk to Binate.

Check out our other works

I am interested in
White right-pointing arrow inside a dark green circular icon.
Thank you! We have received your query. Our team will reach out you shortly.
Oops! Something went wrong while submitting the form.

Let's build something
amazing together

We’ll schedule a call to discuss your idea. After the discovery sessions, we’ll share a proposal, and once it’s approved, we’ll get started.

Portraits of three diverse adults smiling or looking at camera, each in a circular frame with different background colors.
Still have questions?
Can’t find the answer you’re looking for? Please chat to our friendly team.
Contact Us

Frequently Asked
Questions

Portraits of three diverse adults smiling or looking at camera, each in a circular frame with different background colors.
Still have questions?
Can’t find the answer you’re looking for? Please chat to our friendly team.
Green button with dark green text saying Get In Touch and a white arrow pointing right.
Binate Solutions logo
+880 196 280 0429+971 58 142 7639sales@binate-solutions.com
LinkedIn
Facebook
YouTube