mijgame's avatar

BrowserSync ignore not working

Hello,

Currently, I'm trying to get BrowserSync to ignore a certain file. Specifically this file:

resources/ts/graphql/fragmentTypes.json

This file is regenerated every time as a build step. Currently, BrowserSync detects that this file gets emitted and triggers a rebuild/refresh, which emits the file again, triggering a refresh, etc. Basically a infinite loop.

I've tried multiple things to get BrowserSync to ignore the file:

  • The ignore option with the specific file (I tried relative and absolute paths), "*/.json", /.json$/ and a couple more (also as an array)
  • I tried the same things as above in the watchOptions.ignored key.

The above methods include the ones suggested by the BrowserSync documentation. Unfortunately, none of them work.

Does anyone have any ideas?

Thanks!

0 likes
0 replies

Please or to participate in this conversation.