Skip to content

Tailwind stops watching files if a symbolic link exists anywhere in the project #76761

Open
@Lebuin

Description

@Lebuin

Link to the code that reproduces this issue

https://github.com/Lebuin/next-tailwind-repro

To Reproduce

If a symbolic link with the extension .js exists anywhere in the project folder, Tailwind does not rebuild the css file after adding a class somewhere in a template.

Repro:

  • Run npm run dev
  • Open localhost:3000 in a browser. The text on the page is red.
  • In src/app/page.tsx: change the class text-red-500 to text-blue-500

Current vs. Expected behavior

  • Expected result: the webpage reloads and the text on the page is blue.
  • Actual result: the webpage reloads, but the class text-blue-500 is not present in the css, hence the text on the page is black.

Provide environment information

Operating System:
  Platform: linux
  Arch: x64
  Version: #53~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Wed Jan 15 19:18:46 UTC 2
  Available memory (MB): 15887
  Available CPU cores: 8
Binaries:
  Node: 20.18.3
  npm: 10.8.2
  Yarn: N/A
  pnpm: N/A
Relevant Packages:
  next: 15.2.0 // Latest available version is detected (15.2.0).
  eslint-config-next: 15.2.0
  react: 19.0.0
  react-dom: 19.0.0
  typescript: 5.7.3
Next.js Config:
  output: N/A

Which area(s) are affected? (Select all that apply)

CSS

Which stage(s) are affected? (Select all that apply)

next dev (local)

Additional context

@tailwindcss/cli does not appear to be affected by this, which is why I am reporting this bug here. (E.g. observe the output of npm run tailwind in my repro repo.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    CSSRelated to CSS.

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions