Open igidas opened 8 years ago
I have similar issue. i have this configuration:
files: [
src + '/**/*.pug',
'!' + src + '/**/*.jspm.js',
src + '/**/*.js',
src + '/**/*.css'
],
And browser sync still watches *.jspm.js
files.
Very sad that this issue is opened from May 13.(
Same here, negated paths seem to be ignored (triggering reloaded as well) in the files
option.
there is also an ignore
top-level option, it's not in the documentation but it is in the release notes here https://github.com/BrowserSync/browser-sync/releases/tag/v2.23.0; otherwise, the way to ignore seems to be in watchOptions.ignored
option.
(please close)
This worked for me:
ignore: ["**/node_modules/**", "**/.idea/**"],
Issue details
I'm having trouble with BrowserSync file watcher. I can't ignore some files. What I'm trying to do is to reload browser only after my Twig template files are compiled mannualy by watching Gulp 'task_stop' option, but also I'm watching for other assets compile with BrowserSync file watcher.
Steps to reproduce/test case
I'm watching all assets folder, like:
then I try to exclude twig files like:
it still refreshes browsers after twig file edit. I try to pass
ignore
option to Chokidar, but it works only thenfn
callback is defined, like:After looking into BrowserSync code in
file-watcher.js
, I think it could be a bug because ofDefault CB when not given
.Please specify which version of Browsersync, node and npm you're running
Affected platforms
Browsersync use-case
for all other use-cases, (gulp, grunt etc), please show us exactly how you're using Browsersync