We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3f3fff2 commit 512deefCopy full SHA for 512deef
packages/vite/src/node/config.ts
@@ -1093,6 +1093,14 @@ async function loadConfigFromBundledFile(
1093
// with --experimental-loader themselves, we have to do a hack here:
1094
// write it to disk, load it with native Node ESM, then delete the file.
1095
if (isESM) {
1096
+ // check and clear legacy Tmp files
1097
+ const fileBaseName = path.basename(fileName)
1098
+ const fileDir = path.dirname(fileName)
1099
+ const timestampFiles = (await fsp.readdir(fileDir)).filter(name=>name.includes(`${fileBaseName}.timestamp-`))
1100
+ timestampFiles.forEach(name=>{
1101
+ fs.unlink(path.resolve(fileDir,name), () => { });
1102
+ })
1103
+
1104
const fileBase = `${fileName}.timestamp-${Date.now()}-${Math.random()
1105
.toString(16)
1106
.slice(2)}`
0 commit comments