Skip to content

Commit 4c6b1ea

Browse files
committed
fix: add debug logs for the sidebar icons
1 parent c6b5740 commit 4c6b1ea

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

adminforth/spa/src/utils.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,16 +86,24 @@ export const loadFile = (file: string) => {
8686
if (file.startsWith('http')) {
8787
return file;
8888
}
89+
console.log('Loading file:', file);
8990
let path;
9091
let baseUrl = '';
9192
if (file.startsWith('@/')) {
93+
console.log('Loading from @/');
9294
path = file.replace('@/', '');
95+
console.log('Resolved path:', path);
9396
baseUrl = new URL(`./${path}`, import.meta.url.split('?')[0]).href;
97+
console.log('Base URL:', baseUrl);
9498
} else if (file.startsWith('@@/')) {
99+
console.log('Loading from @@/');
95100
path = file.replace('@@/', '');
101+
console.log('Resolved path:', path);
96102
baseUrl = new URL(`./custom/${path}`, import.meta.url.split('?')[0]).href;
103+
console.log('Base URL:', baseUrl);
97104
} else {
98105
baseUrl = new URL(`./${file}`, import.meta.url.split('?')[0]).href;
106+
console.log('Loading from relative path:', baseUrl);
99107
}
100108
return baseUrl;
101109
}

0 commit comments

Comments
 (0)