|
|
@@ -1257,7 +1257,7 @@ this.SingleFileCore = this.SingleFileCore || (() => {
|
|
|
if (duplicate && options.groupDuplicateImages) {
|
|
|
const tokens = [];
|
|
|
for (let token = declaration.value.children.head; token; token = token.next) {
|
|
|
- if (token.data.type == "Url") {
|
|
|
+ if (token.data.type == "Url" && cssTree.generate(token.data.value) == originalResourceURL) {
|
|
|
const value = cssTree.parse("var(" + SINGLE_FILE_VARIABLE_NAME_PREFIX + indexResource + ")", { context: "value" }).children.head;
|
|
|
tokens.push({ token, value });
|
|
|
}
|
|
|
@@ -1266,7 +1266,7 @@ this.SingleFileCore = this.SingleFileCore || (() => {
|
|
|
cssVariables.set(indexResource, content);
|
|
|
} else {
|
|
|
declaration.value.children.forEach(token => {
|
|
|
- if (token.type == "Url") {
|
|
|
+ if (token.type == "Url" && cssTree.generate(token.value) == originalResourceURL) {
|
|
|
token.value.value = content;
|
|
|
}
|
|
|
});
|