browser-sync-webpack-plugin icon indicating copy to clipboard operation
browser-sync-webpack-plugin copied to clipboard

Use the compilation trigger to determine whether CSS injection should happen instead of emitted asset names.

Open farmerau opened this issue 6 years ago • 7 comments

Per discussion on #78 , I've created this. It might be worth deleting lib/getCssOnlyEmittedAssetsNames.js since I've removed the one call to it's method, but I wasn't sure if that was my place on this adjustment.

I also created an option that defaults to scss/sass/less/css as the regular expression for comparison against the compilation trigger.

farmerau avatar Jan 26 '19 19:01 farmerau

It looks like this PR might resolve issues in #69 and #70 as well.

farmerau avatar Feb 09 '19 15:02 farmerau

Tested and works. My setup uses mini-css-extract-plugin that extracts css.

henrijs avatar Mar 13 '19 16:03 henrijs

I cannot seem to get this working. Can you please share your config?

Brendonwbrown avatar Mar 21 '19 19:03 Brendonwbrown

@Brendonwbrown It might be better to see an example of where it isn't working for you.

farmerau avatar Apr 17 '19 01:04 farmerau

@Va1 any thoughts on this? =)

farmerau avatar May 09 '19 01:05 farmerau

any updates?

weilinzung avatar Jun 06 '19 12:06 weilinzung

can someone verify this works and, if it does, that it does on all webpack major versions available?

Va1 avatar Apr 08 '20 17:04 Va1