Skip to content

Commit e7bed9b

Browse files
committed
fix: rebuild
1 parent a9eb195 commit e7bed9b

1 file changed

Lines changed: 11 additions & 2 deletions

File tree

adminforth/modules/codeInjector.ts

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,18 @@ class CodeInjector implements ICodeInjector {
102102
const iconPackageNames = Array.from(collections).map((collection) => `@iconify-prerendered/vue-${collection}`);
103103
process.env.HEAVY_DEBUG && console.log(`Icon package names: ${iconPackageNames.join(', ')}`);
104104
const iconPackages = (
105-
await Promise.allSettled(iconPackageNames.map(async (pkg) => ({ pkg: await import(pathToFileURL(path.join(this.spaTmpPath(), 'node_modules', pkg)).href), name: pkg})))
105+
await Promise.allSettled(
106+
iconPackageNames.map(
107+
async (pkg) => (
108+
{
109+
pkg: await import(pathToFileURL(path.join(this.spaTmpPath(), 'node_modules', pkg)).href),
110+
name: pkg
111+
}
112+
)
113+
)
114+
)
106115
);
107-
116+
process.env.HEAVY_DEBUG && console.log(`Icon packages load results: ${iconPackages.map(res => res.status === 'fulfilled' ? res.value.name : 'error:' + res.reason).join(', ')}`);
108117
const loadedIconPackages = iconPackages.filter(isFulfilled).map((res) => res.value).reduce((acc, { pkg, name }) => {
109118
acc[name.slice(`@iconify-prerendered/vue-`.length)] = pkg;
110119
return acc;

0 commit comments

Comments
 (0)