From 86c8e610ad73fc3b34895d7651c6221bc7c67f1f Mon Sep 17 00:00:00 2001 From: Valentin Hollenstein Date: Mon, 27 May 2024 20:04:35 +0200 Subject: [PATCH] #36 Added dynamic import support to enable the loading of esm dependencies --- src/core/scriptLoader.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/core/scriptLoader.ts b/src/core/scriptLoader.ts index 29a253d..6fe8a38 100644 --- a/src/core/scriptLoader.ts +++ b/src/core/scriptLoader.ts @@ -454,7 +454,8 @@ namespace AMDLoader { scriptSource = nodeInstrumenter(scriptSource, normalizedScriptSrc); const scriptOpts: INodeVMScriptOptions = { filename: vmScriptPathOrUri, cachedData, importModuleDynamically: (specifier) => { - return import(specifier); + // @ts-ignore + return import(specifier); } }; const script = this._createAndEvalScript(moduleManager, scriptSource, scriptOpts, callback, errorback);