From 1e7a1cc371d14b99bb510fe260fd24b25756c685 Mon Sep 17 00:00:00 2001 From: h_mo <596417202@qq.com> Date: Thu, 27 Jun 2024 17:18:56 +0800 Subject: [PATCH] =?UTF-8?q?feat(vite-config):=20=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E9=85=8D=E7=BD=AE=E6=96=87=E4=BB=B6=E8=87=B3?= =?UTF-8?q?=E9=87=8D=E5=90=AF=E7=9B=91=E5=90=AC=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 将 src/pages.json 文件添加到 ViteRestart 插件的重启监听列表中,确保 页面配置文件变更时能够触发服务重启,以使更改生效。 --- vite.config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vite.config.ts b/vite.config.ts index 9ca06fe..fc4360b 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -74,7 +74,7 @@ export default defineConfig(async ({ mode }) => { UnoCSS(), transformClass(), ViteRestart({ - restart: ['vite.config.ts'], + restart: ['vite.config.ts', 'src/pages.json'], }), isH5 && isProd && visualizer({