Skip to content

Commit

Permalink
fix: gracefully ignore unlink errors
Browse files Browse the repository at this point in the history
  • Loading branch information
silverwind committed Jul 22, 2022
1 parent 95c85ab commit 15dd547
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/vite/src/node/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1034,7 +1034,9 @@ async function loadConfigFromBundledFile(
try {
return (await dynamicImport(fileUrl)).default
} finally {
fs.unlinkSync(fileNameTmp)
try {
fs.unlinkSync(fileNameTmp)
} catch {}
}
}
// for cjs, we can register a custom loader via `_require.extensions`
Expand Down

0 comments on commit 15dd547

Please sign in to comment.