|
|
@@ -1050,13 +1050,13 @@ this.SingleFileCore = this.SingleFileCore || (() => {
|
|
|
} else if (cssRule.type == CSSRule.STYLE_RULE) {
|
|
|
rulesContent += processURLFunctions(cssRule.cssText);
|
|
|
} else {
|
|
|
- rulesContent += processURLFunctions(cssRule.cssText);
|
|
|
+ rulesContent += processURLFunctions(cssRule.cssText, true);
|
|
|
}
|
|
|
});
|
|
|
return rulesContent;
|
|
|
}
|
|
|
|
|
|
- function processURLFunctions(cssText) {
|
|
|
+ function processURLFunctions(cssText, preventGrouping) {
|
|
|
const urlFunctions = DomUtil.getUrlFunctions(cssText);
|
|
|
urlFunctions.forEach(urlFunction => {
|
|
|
const originalResourceURL = DomUtil.matchURL(urlFunction);
|
|
|
@@ -1064,7 +1064,7 @@ this.SingleFileCore = this.SingleFileCore || (() => {
|
|
|
if (!DomUtil.testIgnoredPath(resourceURL)) {
|
|
|
if (DomUtil.testValidURL(resourceURL, baseURI) && cssText.includes(urlFunction)) {
|
|
|
const resourceInfo = resourceInfos.get(resourceURL);
|
|
|
- if (options.groupDuplicateImages && resourceInfo.variableName) {
|
|
|
+ if (options.groupDuplicateImages && resourceInfo.variableName && !preventGrouping) {
|
|
|
cssText = cssText.replace(resourceInfo.regExpUrlFunction, resourceInfo.variableName);
|
|
|
} else {
|
|
|
cssText = cssText.replace(resourceInfo.regExpUrlFunction, urlFunction.replace(originalResourceURL, resourceInfo.dataURI));
|