From 762ae2197b4d868b751c7f4ba3ed519e48baa888 Mon Sep 17 00:00:00 2001 From: frostime Date: Fri, 5 Apr 2024 22:54:18 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7=20build:=20yaml-plugin?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- yaml-plugin.js | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/yaml-plugin.js b/yaml-plugin.js index 48c88f1..01c85e2 100644 --- a/yaml-plugin.js +++ b/yaml-plugin.js @@ -3,7 +3,7 @@ * @Author : frostime * @Date : 2024-04-05 21:27:55 * @FilePath : /yaml-plugin.js - * @LastEditTime : 2024-04-05 22:37:40 + * @LastEditTime : 2024-04-05 22:53:34 * @Description : 去妮玛的 json 格式,我就是要用 yaml 写 i18n */ // plugins/vite-plugin-parse-yaml.js @@ -31,15 +31,6 @@ export default function vitePluginYamlI18n(options = {}) { fs.mkdirSync(outDir, { recursive: true }); } - //Remove yaml under outDir, which is auto-moved by vite - const outFiles = fs.readdirSync(outDir); - for (const file of outFiles) { - if (file.endsWith('.yaml') || file.endsWith('.yml')) { - console.log(`-- Remove yaml file ${file} under dist`); - fs.unlinkSync(resolve(outDir, file)); - } - } - //Parse yaml file, output to json const files = fs.readdirSync(inDir); for (const file of files) {