diff --git a/packages/runtime/src/hooks/dependencies.ts b/packages/runtime/src/hooks/dependencies.ts index 3f44785c..94e72104 100644 --- a/packages/runtime/src/hooks/dependencies.ts +++ b/packages/runtime/src/hooks/dependencies.ts @@ -4,7 +4,7 @@ import ModuleLoader from '../utils/ModuleLoader.js'; -let _loader: Function = ModuleLoader.import; +let _loader: Function = (name: string) => ModuleLoader.import(name); export function setDependencyLoader(loader: Function): void { diff --git a/packages/runtime/src/services/LocalNode.ts b/packages/runtime/src/services/LocalNode.ts index 441168df..55377c30 100644 --- a/packages/runtime/src/services/LocalNode.ts +++ b/packages/runtime/src/services/LocalNode.ts @@ -100,7 +100,7 @@ export default class LocalNode extends Node this.#clientId = await repository.registerClient(segmentNames); setRuntime(this); - setDependencyLoader(ModuleLoader.import); + setDependencyLoader((name: string) => ModuleLoader.import(name)); const moduleLocation = await repository.getModuleLocation(this.#clientId);