Skip to content

Regression: image changes are not injected #1489

@cristianl

Description

@cristianl

Issue details

After 2.22.0, changes to images always trigger hard reloads, instead of cachebusting URLs. This regression was introduced recently. I believe it's related to the changes made to the client, using code from Live Reload.

2.21.0 works.

Steps to reproduce/test case

All ways of notifying image changes (via stream(), letting BS watch files, or notifying via the HTTP protocol) cause reloads.

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

  • Browsersync [ 2.23.2 ]
  • Node [ 5.6.0 ]
  • Npm [ 9.3.0 ]

Affected platforms

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

Browsersync use-case

  • API
  • Gulp
  • Grunt
  • CLI

Init code

I use BS with webpack middleware and bs-html-injector. I thought it was caused by bs-html-injector, but after testing with a simpler setup and using minimal settings, I can confirm it's not specific to my use case.

const browserSync = require('browser-sync').create()

function launchBrowserSync(callback) {
  browserSync.init({ server: outputDirs.publicRoot }, callback)
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions