Fast Refresh / Hot Reload not working with Next.js 15 and Tailwind CSS 4 — requires full page reload on changes #18180
Replies: 12 comments 6 replies
-
|
Hey! I'm not seeing this behavior here. Editing components and CSS files works as expected. Can you provide a reproduction? |
Beta Was this translation helpful? Give feedback.
-
|
I have the same issue with Next.js 15.5, Tailwind CSS 4. Never happened to me before, even on another project in Next.js 15.2 with Tailwind CSS 4. Not sure this has something to do with Tailwind tho, I tested other attributes than classes, they're not updating either. |
Beta Was this translation helpful? Give feedback.
-
|
I had same problem, all the page can not hot reload or refresh, only delete .next cache dir can reflect the changes. |
Beta Was this translation helpful? Give feedback.
-
|
I was having the same issue. For whatever reason, it seems that React's Replacing it with |
Beta Was this translation helpful? Give feedback.
-
|
In my case it's not even that things don't update, it's that they actually break. E.g. if I update the background color on an element and save, it disappears completely, and then is correct on a hard refresh. |
Beta Was this translation helpful? Give feedback.
-
|
I had a similar problem here. @utility drop-shadow-br-* {
--tw-drop-shadow-size: drop-shadow(
calc(--value(integer) * var(--unit)) calc(--value(integer) * var(--unit)) 0
var(--tw-drop-shadow-color)
);
filter: var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,)
var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,)
var(--tw-drop-shadow,);
}But before getting it to work, I made different changes and it didn't hot reload, for example: - --tw-drop-shadow: drop-shadow(
+ --tw-drop-shadow-size: drop-shadow(
calc(--value(integer) * var(--unit)) calc(--value(integer) * var(--unit)) 0
var(--tw-drop-shadow-color)
);Restarting my If I bump into this problem again, I guess I'll just use Tailwind CLI (adding it to |
Beta Was this translation helpful? Give feedback.
-
|
Same issue here with I started noticing it when I updated my project from next 15 to 16 like a month ago, and definitely has something to do with Turbopack, because if I run Still, I think something weird is going on because I was using Turbopack in Next 15. I read that in Next 16 some "File System Cache" was enabled by default, so I disabled it, but css updates still don't work. |
Beta Was this translation helpful? Give feedback.
-
|
The likely cause is Tailwind source detection. If stylesheet is at This fixed for me: // file: ./src/app/globals.css
@import 'tailwindcss';
@source '../components';
@source '../theme'; |
Beta Was this translation helpful? Give feedback.
-
|
Ah, got it—so it might be missing the sibling folders in the @source paths.
Does adding @source '../components'; @source '../theme'; fix it for you too?
…On Fri, Mar 27, 2026, 4:49 AM Gurimarukin ***@***.***> wrote:
Ehm, my src/app/globals.css starts with
@import 'tailwindcss' source('..');
—
Reply to this email directly, view it on GitHub
<#18180?email_source=notifications&email_token=B7HZNK2VJICX3CYDZSW3OFD4SZFEJA5CNFSNUABIM5UWIORPF5TWS5BNNB2WEL2ENFZWG5LTONUW63SDN5WW2ZLOOQXTCNRTGQYTKMZZUZZGKYLTN5XKU43VMJZWG4TJMJSWJJLFOZSW45FMMZXW65DFOJPWG3DJMNVQ#discussioncomment-16341539>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/B7HZNKYOET2VYAQVW3L63FD4SZFEJAVCNFSM6AAAAAB6GZKBKKVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTMMZUGE2TGOI>
.
You are receiving this because you are subscribed to this thread.Message
ID: <tailwindlabs/tailwindcss/repo-discussions/18180/comments/16341539@
github.com>
|
Beta Was this translation helpful? Give feedback.
-
|
Awesome, thanks for the update!
…On Thu, Apr 9, 2026, 3:58 AM Mohamed Hassan ***@***.***> wrote:
Can confirm using webpack worked while running ***@***.*** and
***@***.***
I updated to ***@***.*** and it looks like it got fixed and works
for me on both turbopack and webpack.
—
Reply to this email directly, view it on GitHub
<#18180 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/B7HZNK3FXB7NZZ5TRR3S3YT4U5QZTAVCNFSM6AAAAAB6GZKBKKVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTMNJQGA3DONI>
.
You are receiving this because you commented.Message ID:
***@***.***
com>
|
Beta Was this translation helpful? Give feedback.
-
Potential Solutions for Fast Refresh Issues with Tailwind CSS 4 + Next.js 15This issue is often related to how the new Tailwind v4 engine interacts with Next.js's Turbopack or PostCSS pipeline. Here are a few things to check: 1. Turbopack vs WebpackIf you are using npx next dev --turbo # vs
npx next devThere have been known HMR inconsistencies in early Next.js 15 + Tailwind 4 integrations when using Turbopack. 2. Ensure Correct Entry PointIn Tailwind v4, you should typically only have 3. Folder Name CasingOn macOS/Windows (case-insensitive file systems), if your folder is named 4. PostCSS VersionEnsure you have the latest 5. Watcher Limits (Linux/WSL)If you're on Linux, ensure your Hopefully one of these helps get your dev environment back to being snappy! |
Beta Was this translation helpful? Give feedback.
-
|
Hi! Welcome to Tailwind CSS! You can definitely use Tailwind without Node.js or npm. The easiest way for a beginner is to include the Tailwind CDN in your HTML file. Step 1: Add the CDN linkJust add this <!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Tailwind Example</title>
<!-- Tailwind CDN -->
<script src="https://cdn.tailwindcss.com"></script>
</head>
<body>
<h1 class="text-3xl font-bold text-blue-600">
Hello, Tailwind!
</h1>
</body>
</html>
Important Notes:
The CDN version is full and uncompressed (for development). It's perfect for learning or small projects.
If you want to use custom configurations (e.g., custom colors), you can add a tailwind.config object in a separate <script> tag. [Read more here](https://tailwindcss.com/docs/installation/play-cdn).
Alternative (without CDN, just a CSS file):
If you prefer a local .css file instead of the CDN, you can download a pre-compiled version from [Tailwind's GitHub releases](https://github.com/tailwindlabs/tailwindcss/releases) and link it like a normal stylesheet. But for a quick start, the CDN is the simplest.
Let me know if you run into any issues! |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I've created a fresh Next.js 15 project from scratch with the default configuration, integrating Tailwind CSS version 4 following the official setup guide.
However, fast refresh / hot reload is not working as expected:
Whenever I make any modification to components or styles, the page does not update automatically.
I have to manually refresh the entire page to see changes.
This severely impacts development productivity and debugging.
Steps to reproduce:
Create a new Next.js 15 project (npx create-next-app@latest)
Install and configure Tailwind CSS 4 with default settings
Start the development server (next dev)
Modify any component or style file
Observe that the page does not update automatically (no fast refresh)
Expected behavior:
Changes in component or style files should trigger a fast refresh / hot reload without a full page reload.
Actual behavior:
The browser requires a full manual reload to reflect changes.
Environment:
Next.js version: 15.x
Tailwind CSS version: 4.x
Node.js version: 20
OS: Windows 11
Beta Was this translation helpful? Give feedback.
All reactions