From bfd98785971dfe868f740e65b92ae130a8c3956f Mon Sep 17 00:00:00 2001 From: xiaozhiyong Date: Thu, 11 Jun 2026 19:06:55 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/plugin/.gitkeep | 0 vitePlugin/componentName/index.js | 3 +++ 2 files changed, 3 insertions(+) create mode 100644 src/plugin/.gitkeep diff --git a/src/plugin/.gitkeep b/src/plugin/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/vitePlugin/componentName/index.js b/vitePlugin/componentName/index.js index bae9f0f..8f87c68 100644 --- a/vitePlugin/componentName/index.js +++ b/vitePlugin/componentName/index.js @@ -12,6 +12,9 @@ const clearAndUpper = (text) => { // 递归获取目录下所有的 .vue 文件 const getAllVueFiles = (dir, fileList = []) => { + if (!fs.existsSync(dir)) { + return fileList + } const files = fs.readdirSync(dir) files.forEach((file) => { const filePath = path.join(dir, file)