Laragon VS Code and BrowserSync setup to reflect CSS change and browser reload

Hello,

I am using Laragon local server on Windows 10 and VS Code

I am running npm run watch to compile sass to css. I also intalled browsersync via npm in my WordPress project.

Question:

When I run npm run watch it compiles sass to style.css successfully. I am also able to start browsersync with browser-sync start --proxy "http://site.test/" --files "css/*.css". However, css changes are not reflected in browsers. My understanding somewhere I need to add the following code

browserSync({
    files: "css/style.css"
});

in order to automatically inject CSS changes and reflect that in browsers, is that correct?

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.