Skip to content

Commit

Permalink
Update code to work with srcset@5
Browse files Browse the repository at this point in the history
  • Loading branch information
maltsev committed Feb 5, 2024
1 parent aaf6f80 commit 75b6af1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/modules/minifyUrls.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -175,9 +175,9 @@ export default async function minifyUrls(tree, options, moduleOptions) {
if (isSrcsetAttribute(node.tag, attrNameLower)) {
if (srcset) {
try {
const parsedSrcset = srcset.parse(attrValue, { strict: true });
const parsedSrcset = srcset.parseSrcset(attrValue, { strict: true });

node.attrs[attrName] = srcset.stringify(parsedSrcset.map(srcset => {
node.attrs[attrName] = srcset.stringifySrcset(parsedSrcset.map(srcset => {
if (relateUrlInstance) {
srcset.url = relateUrlInstance.relate(srcset.url);
}
Expand Down

0 comments on commit 75b6af1

Please sign in to comment.