adminforth 2.13.0-next.7 → 2.13.0-next.9
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.
- package/dist/spa/src/utils.ts +7 -11
- package/package.json +1 -1
package/dist/spa/src/utils.ts
CHANGED
|
@@ -86,24 +86,20 @@ export const loadFile = (file: string) => {
|
|
|
86
86
|
if (file.startsWith('http')) {
|
|
87
87
|
return file;
|
|
88
88
|
}
|
|
89
|
-
console.log('Loading file:', file);
|
|
90
89
|
let path;
|
|
91
90
|
let baseUrl = '';
|
|
91
|
+
console.log('loadFile', file, "import.meta.url", import.meta.url);
|
|
92
92
|
if (file.startsWith('@/')) {
|
|
93
|
-
console.log('
|
|
93
|
+
console.log('loading from @/');
|
|
94
94
|
path = file.replace('@/', '');
|
|
95
|
-
console.log('
|
|
96
|
-
baseUrl = new URL(`./${path}`, import.meta.url.
|
|
97
|
-
console.log('
|
|
95
|
+
console.log('path', path);
|
|
96
|
+
baseUrl = new URL(`./${path}`, new URL(import.meta.url).origin + new URL(import.meta.url).pathname).href;
|
|
97
|
+
console.log('baseUrl', baseUrl);
|
|
98
98
|
} else if (file.startsWith('@@/')) {
|
|
99
|
-
console.log('Loading from @@/');
|
|
100
99
|
path = file.replace('@@/', '');
|
|
101
|
-
|
|
102
|
-
baseUrl = new URL(`./custom/${path}`, import.meta.url.split('?')[0]).href;
|
|
103
|
-
console.log('Base URL:', baseUrl);
|
|
100
|
+
baseUrl = new URL(`./${path}`, new URL(import.meta.url).origin + new URL(import.meta.url).pathname).href;
|
|
104
101
|
} else {
|
|
105
|
-
baseUrl = new URL(`./${file}`, import.meta.url.
|
|
106
|
-
console.log('Loading from relative path:', baseUrl);
|
|
102
|
+
baseUrl = new URL(`./${file}`, new URL(import.meta.url).origin + new URL(import.meta.url).pathname).href;
|
|
107
103
|
}
|
|
108
104
|
return baseUrl;
|
|
109
105
|
}
|