-
-
Notifications
You must be signed in to change notification settings - Fork 471
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
Adding custom watch target doesn't inject CSS on initial file change (save) event #847
Comments
Yep, I'm seeing this too on 0.11.0 |
@zachleat This is quite an old issue... would it be helpful to refile this? It seems this could definitely be triaged as a bug. |
If I remember correctly, I was able to fix this by removing |
I have since moved to a different method of compiling my CSS and no longer need this, but I also do recall solving this with making sure the the .gitignore didn't have the CSS reference. I'm thinking we can close this issue out and potentially reference this issue in a follow up regarding general watch target issues? |
In this case, I specifically wanted my CSS files to be ignored by git. I was able to solve this by turning off Eleventy's Thanks for the help! |
I think this is a duplicate of #893 (which has a bit more info and discussion there) Please follow along over there! |
Describe the bug
It seems that when adding a custom watch target such as
src/assets/
, BrowserSync is not live updating the CSS after the initial save to that directory (e.g.src/assets/css/app.css
), but when saved again, it is injected.To Reproduce
Clone this repo: https://github.com/eastslopestudio/eleventy-starter
npm install etc...
]npm run start
to fire things upsrc/assets/css/app.css
and then add something high level such asbody { background: red }
and watch for live changes to the site. It likely won't work, BUT, save it again (no changes, just save), and bam, it updates the BrowserSync timestamp (and thus injects the new changes).Expected behavior
The file change to one of the CSS files in the
src/assets/
in the watched folder triggers an immediate BrowserSync event and injects changes on initial save.Environment:
The text was updated successfully, but these errors were encountered: