mirror of https://github.com/status-im/metro.git
asyncRequire: wrap result in default
Reviewed By: cpojer Differential Revision: D6911464 fbshipit-source-id: 44953e0716e076e50d551738059435697d064733
This commit is contained in:
parent
43a7caf90a
commit
01a92f3c2f
|
@ -15,5 +15,5 @@
|
|||
// eslint-disable-next-line flow-no-fixme
|
||||
const dynamicRequire = (require: $FlowFixMe);
|
||||
module.exports = function(moduleID: mixed): Promise<mixed> {
|
||||
return Promise.resolve(dynamicRequire(moduleID));
|
||||
return Promise.resolve().then(() => ({default: dynamicRequire(moduleID)}));
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue