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

Not rebuilding automatically when new classes are added to templates #190

Open
O-39889 opened this issue Nov 14, 2023 · 4 comments
Open

Comments

@O-39889
Copy link

O-39889 commented Nov 14, 2023

That's pretty much it. I installed and set it up all according to instructions on the website, also used the browser reload package, was working on Windows. When I run python manage.py tailwind start, it launches just fine and rebuilds everything. However, after that, when I edit and save the templates, nothing happens, and it doesn't trigger the rebuild process at all. The only workaround I have found besides just relaunching that program each time is just to save the tailwind.config.js file, which will make it rebuild just fine as well, but that of course is really just a hack and kind of not what I intended (and probably not what the developer intended either).

Node.js version: 18.16.0 npm version: 9.5.1

I first thought the problem might be with the content paths in my configs, but since it actually does find new utility classes and builds them correctly, I can only assume the problem might be somewhere else (by the way, the default paths work just fine when detecting templates on launch in my project). However, the docs for this package don't really mention any other setup being required for the JIT mode to work — in fact, isn't JIT mode integrated in new versions anyway?

@vidyanand
Copy link

I am running into the same issue as well.
django-tailwind: 3.6.0
Node.js version: 20.9.0
NPM Version: 10.1.0

@Zenthae
Copy link

Zenthae commented Jan 3, 2024

Same issue here, though I'm in a devcontainer.
What i'm doing at the moment is generating every classes for dev with the following config

    safelist: [
        {
            pattern: /./,
        }
    ],

@Zenthae
Copy link

Zenthae commented Jan 3, 2024

So, after tearing all my hairs off, I found a solution, you must set this env var CHOKIDAR_USEPOLLING=1 for it to work.
The issue is coming from the file watcher used by Tailwindcss, chokidar. Here are the relevant issues:
paulmillr/chokidar#1051
privatenumber/tsx#266 (comment)
https://github.com/paulmillr/chokidar#performance

@alexander-schillemans
Copy link

So, after tearing all my hairs off, I found a solution, you must set this env var CHOKIDAR_USEPOLLING=1 for it to work. The issue is coming from the file watcher used by Tailwindcss, chokidar. Here are the relevant issues: paulmillr/chokidar#1051 privatenumber/tsx#266 (comment) https://github.com/paulmillr/chokidar#performance

Thanks, that fixed it for me!

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

4 participants