Fixed Hash Cycle
This commit is contained in:
parent
80b667f57f
commit
6c1e98f759
|
@ -52,11 +52,11 @@ HotModuleReplacementPlugin.prototype.apply = function(compiler) {
|
|||
compilation.plugin("after-hash", function() {
|
||||
var records = this.records;
|
||||
if(!records) return;
|
||||
if(!records.hash) return;
|
||||
var preHash = records.preHash;
|
||||
if(!preHash) preHash = "x";
|
||||
var lastHash = records.hash || "x";
|
||||
var preHash = records.preHash || "x";
|
||||
var prepreHash = records.prepreHash || "x";
|
||||
if(preHash === this.hash) {
|
||||
this.modifyHash(records.prepreHash);
|
||||
this.modifyHash(prepreHash);
|
||||
return;
|
||||
}
|
||||
records.prepreHash = records.hash || "x";
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "webpack",
|
||||
"version": "0.11.0-beta11",
|
||||
"version": "0.11.0-beta12",
|
||||
"author": "Tobias Koppers @sokra",
|
||||
"description": "Packs CommonJs/AMD/Labeled Modules for the browser. Allows to split your codebase into multiple bundles, which can be loaded on demand. Support loaders to preprocess files, i.e. json, jade, coffee, css, less, ... and your custom stuff.",
|
||||
"dependencies": {
|
||||
|
|
|
@ -9,7 +9,7 @@ describe("HotModuleReplacementPlugin", function() {
|
|||
var entryFile = path.join(__dirname, "js", "entry.js");
|
||||
var recordsFile = path.join(__dirname, "js", "records.json");
|
||||
try { fs.mkdirSync(path.join(__dirname, "js")); } catch(e) {}
|
||||
try { fs.unlinkFileSync(recordsFile); } catch(e) {}
|
||||
try { fs.unlinkSync(recordsFile); } catch(e) {}
|
||||
var compiler = webpack({
|
||||
entry: entryFile,
|
||||
recordsPath: recordsFile,
|
||||
|
|
Loading…
Reference in New Issue