Skip to content

Commit 9a0a816

Browse files
committed
bug fix for webpack#199
1 parent 00c11cb commit 9a0a816

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

lib/Compiler.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -185,15 +185,16 @@ Compiler.prototype.runAsChild = function(callback) {
185185
};
186186

187187
Compiler.prototype.emitAssets = function(compilation, callback) {
188+
var outputPath;
189+
188190
this.applyPluginsAsync("emit", compilation, function(err) {
189-
this.outputFileSystem.mkdirp(this.outputPath, emitFiles.bind(this));
191+
outputPath = this.outputPath.replace(Template.REGEXP_HASH, compilation.hash);
192+
this.outputFileSystem.mkdirp(outputPath, emitFiles.bind(this));
190193
}.bind(this));
191194

192195
function emitFiles(err) {
193196
if(err) return callback(err);
194197

195-
var outputPath = this.outputPath.replace(Template.REGEXP_HASH, compilation.hash);
196-
197198
require("async").forEach(Object.keys(compilation.assets), function(file, callback) {
198199

199200
if(file.indexOf("/") >= 0) {

0 commit comments

Comments
 (0)