The default serve task watches all .scss files and builds them into the /static directory, but the serve task is serving all built files (HTML, CSS, JS, etc.) from the /public directory and using BrowserSync to auto reload when any of the underlying files (inside /public) change.
Steps to reproduce
Currently, if you save a .scss file while running the default gulp serve task the watch task is working and the sass re-compiles, but it is not being moved into the /public directory so browserSync is not updating i.e. you can't preview the changes to CSS.
If you save the HTML file that contains the markup associated with the new CSS (e.g. has the CSS class that you just added to a .scss file) then the compiled CSS file gets moved to the correct location and you are able to preview the updated CSS.
Background
The default
serve
task watches all .scss files and builds them into the/static
directory, but theserve
task is serving all built files (HTML, CSS, JS, etc.) from the/public
directory and using BrowserSync to auto reload when any of the underlying files (inside/public
) change.Steps to reproduce
Currently, if you save a
.scss
file while running the defaultgulp serve
task the watch task is working and the sass re-compiles, but it is not being moved into the/public
directory so browserSync is not updating i.e. you can't preview the changes to CSS.If you save the HTML file that contains the markup associated with the new CSS (e.g. has the CSS class that you just added to a .scss file) then the compiled CSS file gets moved to the correct location and you are able to preview the updated CSS.