From 0808b98181995e1ca085216e4598db12a9a72cbd Mon Sep 17 00:00:00 2001 From: YangFong Date: Sat, 21 Dec 2024 20:21:08 +0800 Subject: [PATCH] fix: file name of build (#485) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 防止文件以下划线开头 --- vite.config.ts | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/vite.config.ts b/vite.config.ts index ade0817..276e07e 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -54,5 +54,13 @@ export default defineConfig({ css: { devSourcemap: true, }, -}, -) + build: { + rollupOptions: { + output: { + chunkFileNames: `static/js/md-[name]-[hash].js`, + entryFileNames: `static/js/md-[name]-[hash].js`, + assetFileNames: `static/[ext]/md-[name]-[hash].[ext]`, + }, + }, + }, +})