I’m new to Sage and trying to understand BrowserSync. Please correct me if I’m wrong:
BrowserSync, when install, is automatically run when I execute gulp watch
When BrowserSync is running under / with gulp watch and I make a change to my SCSS file, then switch to my browser, it should automatically refresh without me actually hitting refresh. Similarly to AJAX.
Is this correct? I’m not getting this result, or any different results, with it installed and running so I’m not clear what I should be expecting and what is wrong.
I could be wrong, however when I run gulp watch browsersync will create a proxy of my dev domain and proxy it on http://localhost:3000 you can also see if browersync is up and running by accessing it via http://localhost:3001 .
If I’m accessing the website via its dev link it will not be updated via browsersync when I make a change, I could be wrong so don’t hold it against me
What hubsta said isn’t wrong. I haven’t tried your exact setup, but you can try putting any URL you like into the devUrl, and BrowserSync will proxy that URL to localhost:3000. You can change the URL https://www.browsersync.io/docs/options#option-proxy, but not sure why you would need to.
If you’re trying to hit the same URL as what you put in devUrl, you’re not hitting BrowserSync so nothing is going to happen. Take a look at the output in your terminal when you run gulp watch, it tells you the URL’s that are available. It also should open a browser window for you to localhost:3000