Open k1sul1 opened 7 years ago
Possibly caused by an updated version of the file-watching module we use. I can't off the top of my head whether symlinks should/shouldn't work - I will have to try it myself and report back!
I was able to replicate the issue in a new project, issue still persists with 2.18.6.
Whenever I edit a style file, the styles are injected, and then the browser is refreshed. This also happens the other way around sometimes, first refresh and then style injection.
2.17.5 still works great.
Issue details
I'm using the same project template for every project I do, and yesterday I noticed strange behaviour in my latest project. Whenever I updated a
.styl
file, and the usual build processes ran, the styles were not injected to the page, but the page was instead refreshed, multiple times (2-3).Just now I got the idea to compare versions between my projects where Browsersync is working properly, and noticed a difference. In my previous projects I've 2.17.5, and on this project I had 2.18.5.
After downgrading to 2.17.5 with
npm install browser-sync@2.17.5
the issue is gone, and styles are injecting correctly.Steps to reproduce/test case
I think that this is related to symlinks somehow. Here's the output from Browsersync 2.18.5:
On 2.17.5 I only get this:
I'm using https://github.com/Seravo/wordpress as my project template, which symlinks
htdocs/wp-content
tohtdocs/wordpress/wp-content/
. My command is rather "naive", because I want to watch for every single change in my project, so it matches inhtdocs/wordpress/wp-content
too. Guess it didn't match symlinks in previous versions?Here's my reduced package.json, which is located at the project root:
So running
npm run serve
will start a new Browsersync instance in the project root, and watches for every PHP & CSS file, and newly updated JS files located in anydist
folder.Please specify which version of Browsersync, node and npm you're running
Affected platforms
Browsersync use-case
If CLI, please paste the entire command below
npm run serve