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

Injection of css files not working in v2.18.11 #1379

Closed
2 of 10 tasks
electerious opened this issue May 17, 2017 · 3 comments
Closed
2 of 10 tasks

Injection of css files not working in v2.18.11 #1379

electerious opened this issue May 17, 2017 · 3 comments

Comments

@electerious
Copy link

Issue details

I'm using bs.reload('*.css') to trigger the reload of css files. This worked fine with v2.18.8 of browser-sync, but v2.18.11 only updates the first link tag on the site. Switching back to v2.18.8 fixes the issue. I haven't tested v2.18.9 and v2.18.10, yet.

bs.reload() works fine and reloads the whole page.

Another edge case: Browser-sync duplicates the link tag, when the first link tag in the head is a favicon. 1 favicon => First reload => 2 favicons => Another reload => 4 favicons => …

Here's a video of the favicon duplication: https://cl.ly/kVMU

Steps to reproduce/test case

Call bs.reload('*.css') with multiple css files in the head:

<!doctype html>
<html lang="en">
	<head>

		<title>Home | Skeleton</title>

		<meta charset="utf-8">
		<meta name="description" content="">
		<meta name="viewport" content="width=device-width, initial-scale=1">

		<!-- Twitter Cards -->
		<!-- <meta name="twitter:card" content="summary_large_image"> -->
		<!-- <meta name="twitter:site" content="@"> -->

		<!-- Open Graph Protocol -->
		<!-- <meta property="og:type" content="website"> -->

		<!-- Open Graph protocol and Twitter Cards -->
		<!-- <meta property="og:title" content="Home | Skeleton"> -->
		<!-- <meta property="og:description" content=""> -->
		<!-- <meta property="og:image" content="assets/images/og.jpg"> -->

		<!-- CSS -->
		<link rel="stylesheet" href="assets/bower/normalize-css/normalize.css">
		<link rel="stylesheet" href="assets/styles/main.css">
		
		<!-- JS -->
		<script defer src="assets/scripts/main.js"></script>
		
	</head>
	<body>

	</body>
</html>

Please specify which version of Browsersync, node and npm you're running

  • Browsersync [ v2.18.11 ]
  • Node [ v7.10.0 ]
  • Npm [ v4.5.0 ]

Affected platforms

  • linux
  • windows
  • OS X
  • freebsd
  • solaris
  • other (please specify which)

Browsersync use-case

  • API
  • Gulp
  • Grunt
  • CLI

for all other use-cases, (gulp, grunt etc), please show us exactly how you're using Browsersync

https://github.com/electerious/Rosid/blob/master/src/deliver.js#L73

@electerious electerious changed the title Injection of css files now working anymore Injection of css files not working in v2.18.8 May 17, 2017
@electerious electerious changed the title Injection of css files not working in v2.18.8 Injection of css files not working in v2.18.10 May 17, 2017
@electerious electerious changed the title Injection of css files not working in v2.18.10 Injection of css files not working in v2.18.11 May 17, 2017
@antenando
Copy link

Exact same thing happens with me with the same config, only I use Gulp as well.

This is a deal breaker for this version.

@shakyShane
Copy link
Contributor

Fixed in v2.18.12, thanks for the report.

@antenando
Copy link

Good job! keep it up

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

3 participants