diff --git a/sheep/api/migration/index.js b/sheep/api/migration/index.js index 7c429fb9..31a85ef2 100644 --- a/sheep/api/migration/index.js +++ b/sheep/api/migration/index.js @@ -1,4 +1,4 @@ -const files = import.meta.globEager('./*.js'); +const files = import.meta.glob('./*.js', { eager: true }); let api = {}; Object.keys(files).forEach((key) => { api = { diff --git a/sheep/store/index.js b/sheep/store/index.js index db59bd48..3d06698d 100644 --- a/sheep/store/index.js +++ b/sheep/store/index.js @@ -2,7 +2,7 @@ import { createPinia } from 'pinia'; import piniaPersist from 'pinia-plugin-persist-uni'; // 自动注入所有pinia模块 -const files = import.meta.globEager('./*.js'); +const files = import.meta.glob('./*.js', { eager: true }); const modules = {}; Object.keys(files).forEach((key) => { modules[key.replace(/(.*\/)*([^.]+).*/gi, '$2')] = files[key].default;