浏览代码

【完善】兼容 HBuilder 最新版本 vite5

YunaiV 1 年之前
父节点
当前提交
c3f3c44e63
共有 2 个文件被更改,包括 2 次插入2 次删除
  1. 1 1
      sheep/api/migration/index.js
  2. 1 1
      sheep/store/index.js

+ 1 - 1
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 = {

+ 1 - 1
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;