Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Injecting not working properly on latest version(s) #1550

Closed
5 tasks
7iomka opened this issue Apr 30, 2018 · 1 comment
Closed
5 tasks

Injecting not working properly on latest version(s) #1550

7iomka opened this issue Apr 30, 2018 · 1 comment

Comments

@7iomka
Copy link

7iomka commented Apr 30, 2018

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');
				}
			});
@shakyShane
Copy link
Contributor

Fixed in browser-sync@2.24.2 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants