mirror of https://github.com/webpack/webpack.git
				
				
				
			fixed file system purging
This commit is contained in:
		
							parent
							
								
									20ad2baf9a
								
							
						
					
					
						commit
						b0caa69ae1
					
				|  | @ -129,8 +129,7 @@ var lastHash = null; | |||
| var compiler = webpack(options, function(err, stats) { | ||||
| 	if(!options.watch) { | ||||
| 		// Do not keep cache anymore
 | ||||
| 		var ifs = compiler.inputFileSystem; | ||||
| 		if(ifs && ifs.purge) ifs.purge(); | ||||
| 		compiler.purgeInputFileSystem(); | ||||
| 	} | ||||
| 	if(err) { | ||||
| 		lastHash = null; | ||||
|  |  | |||
|  | @ -200,6 +200,11 @@ Compiler.prototype.runAsChild = function(callback) { | |||
| 	}.bind(this)); | ||||
| }; | ||||
| 
 | ||||
| Compiler.prototype.purgeInputFileSystem = function() { | ||||
| 	if(this.inputFileSystem && this.inputFileSystem.purge) | ||||
| 		this.inputFileSystem.purge(); | ||||
| }; | ||||
| 
 | ||||
| Compiler.prototype.emitAssets = function(compilation, callback) { | ||||
| 	var outputPath; | ||||
| 
 | ||||
|  |  | |||
|  | @ -87,6 +87,13 @@ MultiCompiler.prototype.run = function(callback) { | |||
| 	}); | ||||
| }; | ||||
| 
 | ||||
| MultiCompiler.prototype.purgeInputFileSystem = function() { | ||||
| 	this.compilers.forEach(function(compiler) { | ||||
| 		if(compiler.inputFileSystem && compiler.inputFileSystem.purge) | ||||
| 			compiler.inputFileSystem.purge(); | ||||
| 	}); | ||||
| }; | ||||
| 
 | ||||
| function MultiStats(stats) { | ||||
| 	this.stats = stats; | ||||
| 	this.hash = stats.map(function(stat) { | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue