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) { | var compiler = webpack(options, function(err, stats) { | ||||||
| 	if(!options.watch) { | 	if(!options.watch) { | ||||||
| 		// Do not keep cache anymore
 | 		// Do not keep cache anymore
 | ||||||
| 		var ifs = compiler.inputFileSystem; | 		compiler.purgeInputFileSystem(); | ||||||
| 		if(ifs && ifs.purge) ifs.purge(); |  | ||||||
| 	} | 	} | ||||||
| 	if(err) { | 	if(err) { | ||||||
| 		lastHash = null; | 		lastHash = null; | ||||||
|  |  | ||||||
|  | @ -200,6 +200,11 @@ Compiler.prototype.runAsChild = function(callback) { | ||||||
| 	}.bind(this)); | 	}.bind(this)); | ||||||
| }; | }; | ||||||
| 
 | 
 | ||||||
|  | Compiler.prototype.purgeInputFileSystem = function() { | ||||||
|  | 	if(this.inputFileSystem && this.inputFileSystem.purge) | ||||||
|  | 		this.inputFileSystem.purge(); | ||||||
|  | }; | ||||||
|  | 
 | ||||||
| Compiler.prototype.emitAssets = function(compilation, callback) { | Compiler.prototype.emitAssets = function(compilation, callback) { | ||||||
| 	var outputPath; | 	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) { | function MultiStats(stats) { | ||||||
| 	this.stats = stats; | 	this.stats = stats; | ||||||
| 	this.hash = stats.map(function(stat) { | 	this.hash = stats.map(function(stat) { | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue