Skip to content

Commit

Permalink
fix(manifest): do not override existing js manifest entry (#18776)
Browse files Browse the repository at this point in the history
  • Loading branch information
dominikg authored Nov 26, 2024
1 parent c7b3308 commit 3b0837e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/vite/src/node/plugins/manifest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,10 @@ export function manifestPlugin(): Plugin {
}

for (const originalFileName of chunk.originalFileNames.slice(1)) {
manifest[originalFileName] = asset
const file = manifest[originalFileName]?.file
if (!(file && endsWithJSRE.test(file))) {
manifest[originalFileName] = asset
}
}
}
}
Expand Down

0 comments on commit 3b0837e

Please sign in to comment.