DEV Community

Cover image for CRA + Tailwind v4 Doesn't Work. So I Stopped Supporting It.
Sriraksha
Sriraksha

Posted on

CRA + Tailwind v4 Doesn't Work. So I Stopped Supporting It.

This week I set out to add Tailwind support to react-clean-start, my React project generator. The goal of the CLI is simple: generate a clean React project without all the boilerplate that usually gets deleted five minutes later.

I expected Tailwind support to be a small feature.

For Vite, it was.

Everything worked in about an hour.

Then I moved on to Create React App.

That's where I lost the rest of my week.

I started with Tailwind v4 using @tailwindcss/postcss, but couldn't get it working. So I dropped back to Tailwind 3, added a tailwind.config.js, and switched back to the classic @tailwind directives.

That somehow made it work...

Sometimes.

Most of the time it still didn't.

The weirdest part was that reinstalling the exact same packages would randomly make it work. Then I'd do the exact same thing later and it'd be broken again.

I compared the generated project against one I'd built by hand, copied files between them, and checked everything I could think of. As far as I could tell, they were effectively identical.

The application always loaded.

Tailwind didn't.

After a week of chasing it, I stopped trying to explain it and made a different decision.

I removed CRA + Tailwind support from react-clean-start entirely and shipped Vite support only.

I also added a warning so anyone selecting CRA with Tailwind knows upfront that it's an unsupported combination instead of spending a weekend debugging a problem that refuses to explain itself.


What I Learned

At first, removing support felt like admitting defeat.

Looking back, I think it was the right decision.

Create React App is effectively deprecated, and the React ecosystem has largely moved on to Vite and other modern bundlers. As the ecosystem moves on, fewer people test those older combinations, fewer issues get fixed, and compatibility problems become much harder to reason about.

That was the biggest takeaway for me. Supporting modern tooling is often less work than supporting legacy tooling.

Sometimes removing a feature is the most responsible release you can make.


🔗 Links


Have you hit this issue too? Drop a comment below. I need to know I'm not alone.

Top comments (0)