From 68e320637e6d27c6ec57d6a5fac11f57e7ca5a08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=A5=E6=B5=A9?= Date: Thu, 30 Oct 2025 09:35:51 +0800 Subject: [PATCH] =?UTF-8?q?feat(main):=20=E5=B0=86=20import.meta.glob=20?= =?UTF-8?q?=E7=9A=84=20eager=20=E9=80=89=E9=A1=B9=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E6=B3=A8=E9=87=8A=E8=AF=B4=E6=98=8E=EF=BC=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main.ts b/src/main.ts index 52a5603..84d25ac 100644 --- a/src/main.ts +++ b/src/main.ts @@ -5,8 +5,9 @@ import { setupPlugins } from './plugins'; consola.level = LogLevels.verbose; -/* `import.meta.glob(${g}, { eager: ${isSync} })`; */ -const autoInstallModules = import.meta.glob('./plugins/!(index).ts', { eager: true }); +const autoInstallModules = import.meta.glob('./plugins/!(index).ts', { + eager: true /* true 为同步,false 为异步 */, +}); const app = setupPlugins(createApp(App), autoInstallModules); await new Promise((resolve) => setTimeout(resolve, 280));