webpack/buildin/module.js

23 lines
497 B
JavaScript
Raw Normal View History

2012-05-23 16:46:37 +08:00
module.exports = function(module) {
2018-02-25 09:00:20 +08:00
if (!module.webpackPolyfill) {
2012-05-23 16:46:37 +08:00
module.deprecate = function() {};
2012-08-23 05:04:26 +08:00
module.paths = [];
// module.parent = undefined by default
2018-02-25 09:00:20 +08:00
if (!module.children) module.children = [];
Object.defineProperty(module, "loaded", {
enumerable: true,
get: function() {
return module.l;
}
});
Object.defineProperty(module, "id", {
enumerable: true,
get: function() {
return module.i;
}
});
2012-05-23 16:46:37 +08:00
module.webpackPolyfill = 1;
}
return module;
2017-01-11 17:51:58 +08:00
};