We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ee6cc08 commit c998ac3Copy full SHA for c998ac3
lib/utils/requireModule.js
@@ -18,7 +18,7 @@ module.exports = function (fullpath) {
18
return import(fullpath).then(result => (result.default || {}));
19
}
20
21
- if (exported && Object.prototype.hasOwnProperty.call(exported, 'default')) {
+ if (exported && Object.prototype.hasOwnProperty.call(exported, 'default') && Object.keys(exported).length === 1) {
22
return exported.default;
23
24
test/extra/external-globals.js
@@ -1,6 +1,8 @@
1
const assert = require('assert');
2
3
module.exports = {
4
+ 'default': {},
5
+
6
async before() {
7
this.isFungus = true;
8
},
0 commit comments