Skip to content

Commit 04121c8

Browse files
committed
add SourceMap file to chunk.file even in cached case
fixes webpack-contrib/extract-text-webpack-plugin#24
1 parent d117401 commit 04121c8

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

lib/SourceMapDevToolPlugin.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,10 @@ SourceMapDevToolPlugin.prototype.apply = function(compiler) {
3535
var asset = this.assets[file];
3636
if(asset.__SourceMapDevTool_Data) {
3737
var data = asset.__SourceMapDevTool_Data;
38-
for(var file in data) {
39-
this.assets[file] = data[file];
38+
for(var cachedFile in data) {
39+
this.assets[cachedFile] = data[cachedFile];
40+
if(cachedFile !== file)
41+
chunk.files.push(cachedFile);
4042
}
4143
return;
4244
}

0 commit comments

Comments
 (0)