diff --git a/lib/RemoteModule.js b/lib/RemoteModule.js index 950cf9c..54a874a 100644 --- a/lib/RemoteModule.js +++ b/lib/RemoteModule.js @@ -68,7 +68,7 @@ const getExternalSourceForScriptExternal = (variableName, externalRequest, keepA 'reject(__webpack_error__);', ])}, ${JSON.stringify(globalName)});`, ])})`, - `.then(${returningFunction(getLazyOnceValueSource(`${globalName}.get(${objectLookup})`, keepAsync))});`, + `.then(${returningFunction(getLazyOnceValueSource(`${globalName}.get(${objectLookup}).then(${returningFunction('factory()', 'factory')})`, keepAsync))});`, `${RuntimeGlobals.makeNamespaceObject}(module.exports);`, '}());', ])