next.js: NextJS 14 HMR Tailwind CSS reloading not working
Link to the code that reproduces this issue
https://github.com/krishnerkar/next-intercepting-routes-demo
To Reproduce
- Use the example next intercepting routes demo (originally based on Next 13)
- Update to NextJS 14 (I personally tested 14.2.3 and 14.0.0 and had the same bug on both)
- Change
/app/@modal/(..)productto/app/@modal/(.)productor/app/@modal/(...)product(have to fix path on Next 14) - Add
w-fulltoProductDialogDescriptioninapp/@modal/(...)product/[id]/page.tsx - Launch application
- Try changing this width to
w-2/12or anything else and notice it won’t hot reload the proper width.
Current vs. Expected behavior
I expected the new CSS class to be applied on hot reload, like it did in NextJS 13. However, the class seems to not be loaded and therefore not applied.
Provide environment information
Operating System:
Platform: darwin
Arch: arm64
Version: Darwin Kernel Version 23.4.0: Fri Mar 15 00:10:42 PDT 2024; root:xnu-10063.101.17~1/RELEASE_ARM64_T6000
Binaries:
Node: 20.13.0
npm: 10.5.2
Yarn: 1.22.18
pnpm: 9.1.0
Relevant Packages:
next: 14.0.0
eslint-config-next: 13.3.0
react: 18.2.0
react-dom: 18.2.0
typescript: 5.0.4
Next.js Config:
output: N/A
Which area(s) are affected? (Select all that apply)
Developer Experience
Which stage(s) are affected? (Select all that apply)
next dev (local)
Additional context
No response
About this issue
- Original URL
- State: open
- Created 2 years ago
- Reactions: 12
- Comments: 15 (2 by maintainers)
Using
next dev --turboseems to work. I’m on14.2.3.@Badlapje The
Developer Experiencewas too generic of a label, so it wasn’t helpful!No update for this? I’ve updated to Next 15 which has broke Turbopack, tried reverting to Webpack but still getting this issue
HMR does reload the styles, but the classes haven’t been generated by Tailwind