0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2025-03-24 23:21:57 -05:00

style: lint

This commit is contained in:
Josh Chappelow 2024-08-18 14:58:11 +09:00
parent 08c9867ea6
commit 0fbcb2495f

View file

@ -333,10 +333,12 @@ async function emitOptimizedImages(
globalThis.astroAsset.referencedImages.add(fsPath); globalThis.astroAsset.referencedImages.add(fsPath);
} }
const pathToImg = prependForwardSlash(path.relative( const pathToImg = prependForwardSlash(
path.relative(
ctx.astroConfig.root.pathname, ctx.astroConfig.root.pathname,
path.join(path.dirname(ctx.filePath), node.attributes.src) path.join(path.dirname(ctx.filePath), node.attributes.src),
)); ),
);
node.attributes[attributeName] = { ...src, fsPath }; node.attributes[attributeName] = { ...src, fsPath };
node.attributes.src = pathToImg; node.attributes.src = pathToImg;
} }