Copy statics off of foreign exports objects when doing an ES6 import
This commit is contained in:
@@ -1,3 +1,16 @@
|
||||
(function (obj) {
|
||||
return obj && obj.__esModule ? obj : { default: obj };
|
||||
if (obj && obj.__esModule) {
|
||||
return obj;
|
||||
} else {
|
||||
var hop = Object.prototype.hasOwnProperty;
|
||||
var es_obj = { "default": obj };
|
||||
if (typeof obj === "object" && obj !== null) {
|
||||
for (var key in obj) {
|
||||
if (key !== "default" && hop.call(obj, key)) {
|
||||
es_obj[key] = obj[key];
|
||||
}
|
||||
}
|
||||
}
|
||||
return es_obj;
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user