fix: Exclude remote srcset URLs (#986)
* fix: Exclude remote srcset URLs Fixed #985 * chore: add changeset for 'Exclude remote srcset URLs'
This commit is contained in:
parent
0334956030
commit
27672096f5
2 changed files with 8 additions and 1 deletions
5
.changeset/fair-cameras-draw.md
Normal file
5
.changeset/fair-cameras-draw.md
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
'astro': patch
|
||||
---
|
||||
|
||||
Exclude remote srcset URLs
|
|
@ -303,7 +303,9 @@ export function findDeps(html: string, { astroConfig, srcPath }: { astroConfig:
|
|||
const sources = srcset.split(',');
|
||||
const srces = sources.map((s) => s.trim().split(' ')[0]);
|
||||
for (const src of srces) {
|
||||
pageDeps.images.add(getDistPath(src, { astroConfig, srcPath }));
|
||||
if (!isRemote(src)) {
|
||||
pageDeps.images.add(getDistPath(src, { astroConfig, srcPath }));
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in a new issue