BrowserSync / browser-sync

Keep multiple browsers & devices in sync when building websites. https://browsersync.io
https://discord.gg/2d2xUThp
Apache License 2.0
12.17k stars 754 forks source link

Issue with Chrome losing sourcemaps after reloading CSS #1740

Open TristanBrotherton opened 4 years ago

TristanBrotherton commented 4 years ago

Issue details

I filed a bug with Chrome, and I'm not sure if the issue lies there or within browsersync. You can view the Chrome issue here: https://bugs.chromium.org/p/chromium/issues/detail?id=1044383#c9

Essentially when compiling with sourcemaps, the sourcemaps are lost after refreshing the styles Please provide issue details here.

Steps to reproduce/test case

Directions here; https://bugs.chromium.org/p/chromium/issues/detail?id=1044383#c9

Please provide necessary steps for reproduction of this issue, or better the reduced test case (without any external dependencies).

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

Affected platforms

Browsersync use-case

If CLI, please paste the entire command below

{cli command here}

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

{Browsersync init code here}

yura-x commented 3 years ago

Had same issue with Chrome browser. After injecting new compiled CSS files there was no source maps in the Chrome DevTools.

My problem was resolved after changing this code:

.pipe(browserSync.stream({match: '**/*.css'})); to this: .pipe(browserSync.stream());

in my gulpfile.js