feat(main): 将 import.meta.glob 的 eager 选项添加注释说明,
All checks were successful
CI/CD Pipeline / playwright (push) Successful in 2m11s
CI/CD Pipeline / build-and-deploy (push) Successful in 2m34s

This commit is contained in:
严浩
2025-10-30 09:35:51 +08:00
parent f81c7614be
commit 68e320637e

View File

@@ -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));