Skip to content

Commit

Permalink
fix(WIP: build): stop removing @samply subfolder
Browse files Browse the repository at this point in the history
  • Loading branch information
MatsJohansen87 committed Feb 5, 2024
1 parent 472d3d5 commit a33bf82
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,14 +118,15 @@ function moveFile(oldFile: string, target: string): void {
const interval = setInterval(() => {
attempts++;
if (fs.readFileSync(oldFile, 'utf-8').length > 0) {
fs.renameSync(oldFile, target);
// fs.renameSync(oldFile, target);
fs.copyFileSync(oldFile, target);
clearInterval(interval);
} else if (attempts > 10) {
throw new Error('File not found');
clearInterval(interval);
}
if(fs.readdirSync('./dist/@samply/').length === 0) {
fs.rmSync('./dist/@samply/', { recursive: true, force: true });
// fs.rmSync('./dist/@samply/', { recursive: true, force: true });
}
}, 1000);
}
Expand Down

0 comments on commit a33bf82

Please sign in to comment.