0
votes

I'm trying to use browsersync without Gulp, just plain old html and css, but it won't update any changes made to css. The browsersync shows that it's connected when I open the page through the terminal, but it isn't injecting CSS when I change/add CSS in the project and the terminal just shows this:

[BS] Serving files from: ./ [BS] Watching files...

1

1 Answers

0
votes

Okay, so like I said in my previous (deleted) answer, I had the same troubles. Server started, "Connected to BrowserSync" popped up on browser, but no reload when I change anything to my html.

At first, I thought it was Chokidar that was the problem. So I updated it with npm install -g chokidar and npm install chokidar --save. However, when I got home (I had the problem on both my work and home computer), this fix didn't work. Then I noticed this worked: browser-sync start --server --files "*.html", but this failed: browser-sync start --server --files "css/*.css, *.html, js/*.js". That last one is a .bat file I used on my previous project.

So, I started googling and found a different syntax. I changed my command and now it works: browser-sync start --server --files "css/*.css" "*.html" "js/*.js" (mind the spaces and quotes instead of comma's)

I have no idea if I'm seeing ghosts, or if the syntax actually changed.