Browser-sync: Injecting not working properly on latest version(s)

Created on 30 Apr 2018  路  1Comment  路  Source: BrowserSync/browser-sync

Issue details

Injecting not working in general or properly;
Latest version: https://cl.ly/1R1h2O3T0U2i
Version 2.18.13: https://cl.ly/1F350K1Q1t44

It seems that in recent versions do not work sockets.emit, but in previously versions - they work through time. Help me please!

Affected platforms

  • [ ] linux
  • [+] windows
  • [ ] OS X
  • [ ] freebsd
  • [ ] solaris
  • [ ] other _(please specify which)_

UPD:
Only one solution to make it working is this code (and it works only on previously version):

bs.watch(`${build}/**/*.css`, function (event, file) {
                if (event === "change") {
                    // reload all css (inject)
                    bs.reload('*.css');
                    bs.sockets.emit('styles:update');
                }
            });

Most helpful comment

Fixed in [email protected] :)

>All comments

Fixed in [email protected] :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ilianaza picture ilianaza  路  4Comments

ngryman picture ngryman  路  3Comments

sedubois picture sedubois  路  3Comments

tonyoconnell picture tonyoconnell  路  3Comments

adjavaherian picture adjavaherian  路  4Comments