From d7b0c15619e89d31c74f8db7a680b4c6a0009add Mon Sep 17 00:00:00 2001 From: Ben Lin <maobin001@msn.com> Date: 星期五, 09 八月 2024 16:51:34 +0800 Subject: [PATCH] 工艺路线行为上料选择更新 --- mock/_createProductionServer.ts | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mock/_createProductionServer.ts b/mock/_createProductionServer.ts index 2f1d328..57c2755 100644 --- a/mock/_createProductionServer.ts +++ b/mock/_createProductionServer.ts @@ -16,14 +16,14 @@ // return pre; // }, [] as any[]); -const modules = import.meta.globEager('./**/*.ts'); +const modules = import.meta.glob('./**/*.ts', { eager: true }); const mockModules: any[] = []; Object.keys(modules).forEach((key) => { if (key.includes('/_')) { return; } - mockModules.push(...modules[key].default); + mockModules.push(...(modules as Recordable)[key].default); }); /** -- Gitblit v1.9.3