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

  1. Use the example next intercepting routes demo (originally based on Next 13)
  2. Update to NextJS 14 (I personally tested 14.2.3 and 14.0.0 and had the same bug on both)
  3. Change /app/@modal/(..)product to /app/@modal/(.)product or /app/@modal/(...)product (have to fix path on Next 14)
  4. Add w-full to ProductDialogDescription in app/@modal/(...)product/[id]/page.tsx
  5. Launch application
  6. Try changing this width to w-2/12 or 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)

Most upvoted comments

Using next dev --turbo seems to work. I’m on 14.2.3.

@Badlapje The Developer Experience was 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