webpack/lib/AsyncDependenciesBlock.js

26 lines
754 B
JavaScript
Raw Normal View History

2013-01-31 01:49:25 +08:00
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
var DependenciesBlock = require("./DependenciesBlock");
2014-01-23 22:31:40 +08:00
function AsyncDependenciesBlock(name, module, loc) {
2013-01-31 01:49:25 +08:00
DependenciesBlock.call(this);
2014-01-23 22:31:40 +08:00
this.chunkName = name;
2013-01-31 01:49:25 +08:00
this.chunk = null;
2014-01-23 22:31:40 +08:00
this.module = module;
this.loc = loc;
2013-01-31 01:49:25 +08:00
}
module.exports = AsyncDependenciesBlock;
AsyncDependenciesBlock.prototype = Object.create(DependenciesBlock.prototype);
AsyncDependenciesBlock.prototype.updateHash = function updateHash(hash) {
2014-01-23 22:31:40 +08:00
hash.update(this.chunkName || "");
2013-01-31 01:49:25 +08:00
DependenciesBlock.prototype.updateHash.call(this, hash);
};
AsyncDependenciesBlock.prototype.disconnect = function() {
this.chunk = null;
DependenciesBlock.prototype.disconnect.call(this);
};