adminforth 2.13.0-next.11 → 2.13.0-next.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -88,12 +88,25 @@ export const loadFile = (file: string) => {
88
88
  }
89
89
  let path;
90
90
  let baseUrl = '';
91
- console.log('loadFile', file, "import.meta.url", import.meta.url);
92
91
  if (file.startsWith('@/')) {
93
- console.log('loading from @/');
94
92
  path = file.replace('@/', '');
95
93
  console.log('path', path);
96
- baseUrl = new URL(`./${path}`, new URL(import.meta.url).origin + new URL(import.meta.url).pathname).href;
94
+ const modules = import.meta.glob('./**/*');
95
+ const fileModulePath = `./${path}`;
96
+ let matchingModulePath = '';
97
+ for (const modulePath in modules) {
98
+ console.log('modulePath', modulePath);
99
+ if (modulePath === fileModulePath) {
100
+ matchingModulePath = modulePath;
101
+ break;
102
+ }
103
+ }
104
+ console.log('matchingModulePath', matchingModulePath);
105
+
106
+
107
+
108
+
109
+ baseUrl = new URL(fileModulePath ,import.meta.url).href;
97
110
  console.log('baseUrl', baseUrl);
98
111
  } else if (file.startsWith('@@/')) {
99
112
  path = file.replace('@@/', '');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "adminforth",
3
- "version": "2.13.0-next.11",
3
+ "version": "2.13.0-next.12",
4
4
  "description": "OpenSource Vue3 powered forth-generation admin panel",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",