Skip to main content

Posts

Tailwind CSS v4 Upgrade: Fixing 'Unknown At Rule' and Missing Styles

  You’ve upgraded your dependencies to Tailwind CSS v4, expecting the promised performance boost from the new Oxide engine. Instead, your build finishes instantly but your styles are missing, or your console is flooded with   Unknown at rule @tailwind   errors. Tailwind v4 represents a paradigm shift from a JavaScript-configured utility library to a native CSS-first build tool. The breakage occurs because v4 deprecates the proprietary directives and JavaScript configuration reliance you’ve used for years. Here is why your build is breaking and the rigorous path to fixing it. The Root Cause: Architecture Shift In v3, Tailwind relied on PostCSS to scan your  tailwind.config.js , generate an Abstract Syntax Tree (AST), and inject CSS via the  @tailwind  directives ( base ,  components ,  utilities ). In v4, the architecture is inverted: Native CSS Resolution:  The core directives are replaced by standard CSS  @import  statements. No De...

Next.js 15 Caching: Why Your Data Is Not Caching and How to Fix It

  You’ve just migrated a production application to Next.js 15. The build passes, linting is clean, and the app runs. But monitoring tools are signaling a critical anomaly: database connections have spiked, third-party API quotas are draining rapidly, and page load times (TTFB) have degraded. The behavior of your application has inverted. Static pages are rendering dynamically, and data you expected to remain fresh for hours is being refetched on every single request. This is not a bug. It is the result of a fundamental architectural shift in Next.js 15 regarding default caching strategies. The Root Cause: Standardizing  fetch  Behavior In Next.js 14, the framework extended the native Web  fetch  API to default to  cache: 'force-cache' . This meant that unless you explicitly opted out, Next.js aggressively cached every GET request in the Data Cache. While performant, this was "magic" behavior that deviated from web standards and often led to the "stale data"...