Skip to content

Commit

Permalink
Merge pull request #4107 from webpack/bugfix/issue-4086
Browse files Browse the repository at this point in the history
fixes #4086
  • Loading branch information
sokra committed Apr 4, 2017
2 parents 83ad4b0 + 546fe6d commit 114c2e0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/SourceMapDevToolPlugin.js
Expand Up @@ -42,7 +42,7 @@ SourceMapDevToolPlugin.prototype.apply = function(compiler) {
chunks.forEach(function(chunk) {
chunk.files.filter(ModuleFilenameHelpers.matchObject.bind(undefined, options)).map(function(file) {
var asset = this.assets[file];
if(asset.__SourceMapDevToolData) {
if(asset.__SourceMapDevToolFile === file && asset.__SourceMapDevToolData) {
var data = asset.__SourceMapDevToolData;
for(var cachedFile in data) {
this.assets[cachedFile] = data[cachedFile];
Expand Down Expand Up @@ -123,6 +123,7 @@ SourceMapDevToolPlugin.prototype.apply = function(compiler) {
}
sourceMap.sourceRoot = options.sourceRoot || "";
sourceMap.file = file;
asset.__SourceMapDevToolFile = file;
asset.__SourceMapDevToolData = {};
var currentSourceMappingURLComment = sourceMappingURLComment;
if(currentSourceMappingURLComment !== false && /\.css($|\?)/i.test(file)) {
Expand Down

0 comments on commit 114c2e0

Please sign in to comment.