Lazy initialize sandboxes (workers) upon first need
This commit is contained in:
+2
-2
@@ -245,13 +245,13 @@ export class Editor {
|
||||
).json();
|
||||
|
||||
this.system.on({
|
||||
plugLoaded: async (plug) => {
|
||||
sandboxInitialized: async (sandbox) => {
|
||||
for (
|
||||
const [modName, code] of Object.entries(
|
||||
globalModules.dependencies,
|
||||
)
|
||||
) {
|
||||
await plug.sandbox.loadDependency(modName, code as string);
|
||||
await sandbox.loadDependency(modName, code as string);
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user