webpack/buildin/module.js

21 lines
528 B
JavaScript
Raw Normal View History

2012-05-23 16:46:37 +08:00
module.exports = function(module) {
if(!module.webpackPolyfill) {
module.deprecate = function() {};
2012-08-23 05:04:26 +08:00
module.paths = [];
// module.parent = undefined by default
if(!module.children) module.children = [];
Object.defineProperty(module, "loaded", {
enumerable: true,
configurable: false,
get: function() { return module.l; }
});
Object.defineProperty(module, "id", {
enumerable: true,
configurable: false,
get: function() { return module.i; }
});
2012-05-23 16:46:37 +08:00
module.webpackPolyfill = 1;
}
return module;
}