Skip to content

Commit 252258d

Browse files
author
Loïc Mangeonjean
committed
fix: exclude all non-relative asset urls from path rewritting
1 parent 0e370a2 commit 252258d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

packages/vite/src/node/optimizer/rolldownDepPlugin.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import {
1010
flattenId,
1111
isBuiltin,
1212
isCSSRequest,
13-
isDataUrl,
1413
isExternalUrl,
1514
isNodeBuiltin,
1615
moduleListContains,
@@ -336,7 +335,8 @@ export function rolldownDepPlugin(
336335
}
337336

338337
const url = rawUrl.slice(1, -1)
339-
if (isDataUrl(url) || isExternalUrl(url) || url.startsWith('/')) {
338+
if (!url.startsWith('.')) {
339+
// This is not a relative url
340340
continue
341341
}
342342

0 commit comments

Comments
 (0)