diff --git a/packages/dynamic-import/client.js b/packages/dynamic-import/client.js index b6282fb6c4..cf04e8a304 100644 --- a/packages/dynamic-import/client.js +++ b/packages/dynamic-import/client.js @@ -178,5 +178,12 @@ function getNamespace(module, id) { } }); + // This helps with Babel interop, since we're not just returning the + // module.exports object. + Object.defineProperty(namespace, "__esModule", { + value: true, + enumerable: false + }); + return namespace; }