mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-02 06:19:58 +00:00
Fix extension script load timing (#29)
This commit is contained in:
@@ -1503,20 +1503,18 @@ export class ComfyApp {
|
||||
const extensions = await api.getExtensions();
|
||||
this.logging.addEntry("Comfy.App", "debug", { Extensions: extensions });
|
||||
|
||||
const extensionPromises = extensions
|
||||
.filter(extension => !extension.includes("extensions/core"))
|
||||
.map(async ext => {
|
||||
try {
|
||||
await import(/* @vite-ignore */api.apiURL(ext));
|
||||
} catch (error) {
|
||||
console.error("Error loading extension", ext, error);
|
||||
}
|
||||
});
|
||||
|
||||
// Need to load core extensions first as some custom extensions
|
||||
// may depend on them.
|
||||
await import("../extensions/core/index.js");
|
||||
await Promise.all(extensionPromises);
|
||||
await Promise.all(extensions
|
||||
.filter(extension => !extension.includes("extensions/core"))
|
||||
.map(async ext => {
|
||||
try {
|
||||
await import(/* @vite-ignore */api.apiURL(ext));
|
||||
} catch (error) {
|
||||
console.error("Error loading extension", ext, error);
|
||||
}
|
||||
}));
|
||||
}
|
||||
|
||||
async #migrateSettings() {
|
||||
|
||||
Reference in New Issue
Block a user