|
@@ -2,7 +2,7 @@ import { createPinia } from 'pinia';
|
|
import piniaPersist from 'pinia-plugin-persist-uni';
|
|
import piniaPersist from 'pinia-plugin-persist-uni';
|
|
|
|
|
|
// 自动注入所有pinia模块
|
|
// 自动注入所有pinia模块
|
|
-const files = import.meta.globEager('./*.js');
|
|
|
|
|
|
+const files = import.meta.glob('./*.js', { eager: true });
|
|
const modules = {};
|
|
const modules = {};
|
|
Object.keys(files).forEach((key) => {
|
|
Object.keys(files).forEach((key) => {
|
|
modules[key.replace(/(.*\/)*([^.]+).*/gi, '$2')] = files[key].default;
|
|
modules[key.replace(/(.*\/)*([^.]+).*/gi, '$2')] = files[key].default;
|