diff --git a/src/node/buildPluginAsset.ts b/src/node/buildPluginAsset.ts index bb0dad9dffc7d0..9a6c160909f244 100644 --- a/src/node/buildPluginAsset.ts +++ b/src/node/buildPluginAsset.ts @@ -31,7 +31,7 @@ export const resolveAsset = async ( const baseName = path.basename(id, ext) const resolvedFileName = `${baseName}.${hash_sum(id)}${ext}` - let url = slash(path.join(publicBase, assetsDir, resolvedFileName)) + let url = `.${slash(path.join(publicBase, assetsDir, resolvedFileName))}` const content = await fs.readFile(id) if (!id.endsWith(`.svg`) && content.length < inlineLimit) { url = `data:${mime.lookup(id)};base64,${content.toString('base64')}`