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

pull/52/head
YunaiV 2024-05-02 09:39:00 +08:00
parent 97802232a2
commit c3f3c44e63
2 changed files with 2 additions and 2 deletions

View File

@ -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 = {

View File

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