Skip to content

Commit 46feff2

Browse files
committed
make sure we only run the legacy hash normalization if the path hasn't already been normalized
1 parent 46e5899 commit 46feff2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/bundler-plugin-core/src/utils/normalizePath.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ export const normalizePath = (path: string, format: string): string => {
5656
}
5757

5858
// handle vite legacy builds
59-
if (path.includes("legacy")) {
59+
if (normalizedPath === path && path.includes("legacy")) {
6060
const regexReplacement =
6161
/(?<leadingDelimiter>\S+-legacy-)(?<hash>[0-9a-zA-Z\/+=_\/+=-]+)(?<endingDelimiter>.\S+)/i;
6262

0 commit comments

Comments
 (0)