Closed hrbonz closed 2 years ago
This issue has been automatically marked as idle and stale because it hasn't had any recent activity. It will be automtically closed if no further activity occurs. If you think this is wrong, or the problem still persists, just pop a reply in the comments and @remy will (try!) to follow up. Thank you for contributing <3
Automatically closing this issue due to lack of activity
@hrbonz Did you ever get that work for you? I have a node express tailwindcss setup and I'm having the a similar issue where nodemon and tailwind are running and watching but tailwind ads the classes I use in my ejs files but doesn't remove them when I remove them from the ejs files. The only way that will happen is my stopping the process and running it again, then the tailwind cli scans the files and removes them on start up.
This is what my package.json file looks like: "scripts": { "start": "run-p server tailwind", "tailwind": "tailwindcss -i ./css/input.css -o ./public/output.css --watch --minify", "server": "nodemon server.js" },
Never got it to work, I had to split the monitoring of files and chain them which is quite ugly but works
Versions:
Expected behaviour
Tailwind essentially takes 3 input files to render a CSS file:
tailwind.config.js
: configuration of the tooltailwind.css
: extra CSS declarationsThe problem with tailwind watch is that it will only react to changes in content files so I want to use nodemon to restart a watch script when
tailwind.config.js
ortailwind.css
change:The
common:tailwind_watch
script is defined inpackage.json
:Actual behaviour
When using both watch declarations, nodemon won't do anything when change happens in the files watched. If I run nodemon to watch only one file (either file), then the process restarts properly.
I've tried adding
-e css,js
and-e css,config.js
after reading an old issue but it doesn't change anything. I've used--dump
to take a look at the result but I'm not quite comfortable enough with the content to detect any problem.One way I got it to work is by "chaining" two nodemon each watching one file (
nodemon watching tailwind.config.js
->nodemon watching tailwind.css
->yarn script
) and that worked but is quite ugly.Steps to reproduce
npm packages:
I use yarn workspaces and Plug'n'Play inside a virtualenv with
nodeenv
(a python package that allows me to install node in virtualenv) if that could create any type of side effect.Dump: