Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tailwind HMR does not work with Next.js with symlinks #13533

Open
nahtnam opened this issue Apr 17, 2024 · 1 comment
Open

Tailwind HMR does not work with Next.js with symlinks #13533

nahtnam opened this issue Apr 17, 2024 · 1 comment

Comments

@nahtnam
Copy link

nahtnam commented Apr 17, 2024

What version of Tailwind CSS are you using?

3.4.1

What build tool (or framework if it abstracts the build tool) are you using?

Next.js 14.2.1 with tailwind 3.4.1

What version of Node.js are you using?

v20.9.0

What browser are you using?

Chrome

What operating system are you using?

macOS

Reproduction URL

https://github.com/nahtnam/tailwind-symlink-bug

Describe your issue

  1. Clone the above repo
  2. Start the server
  3. Go to the prose and add prose-sm, prose-lg, or prose-xl. It will not generate the class name. If you restart the server it does. You can also do something like py-[100px]
  4. Remove the folder src/app/(symlink) (which contains a symlink)
  5. Now add or change the prose sizing and it works fine
@angela683h
Copy link

angela683h commented May 25, 2024

You’re encountering a known issue with Tailwind CSS and Next.js where Hot Module Replacement (HMR) does not work correctly with symlinks. This can prevent Tailwind from generating the correct class names on the fly. Here’s a quick summary of what you can do:

Remove symlinks: As you’ve noticed, removing the symlink resolves the issue.
Restart the server: Restarting the server can temporarily fix the problem by regenerating the classes.

I hope it's helpful to you.

Best Regard,
angela683h
Official Website

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants