From 76c8b4a4c648b54cc04bd5bf09d233cb7e244f10 Mon Sep 17 00:00:00 2001 From: kuaifan Date: Fri, 3 Jan 2025 04:48:38 +0800 Subject: [PATCH] no message --- vite.config.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/vite.config.js b/vite.config.js index 079964eb4..091951ce4 100644 --- a/vite.config.js +++ b/vite.config.js @@ -66,11 +66,14 @@ export default defineConfig(({command, mode}) => { fs.unlinkSync(destPath); console.log(`Removed ${destPath}`); } - } else { - fs.mkdirSync(path.dirname(destPath), {recursive: true}); - fs.copyFileSync(filePath, destPath); - console.log(`Copied ${filePath} to ${destPath}`); + return; } + if (path.basename(filePath) === '.DS_Store') { + return; + } + fs.mkdirSync(path.dirname(destPath), {recursive: true}); + fs.copyFileSync(filePath, destPath); + console.log(`Copied ${filePath} to ${destPath}`); } }); }