Skip to content

Commit 114c2e0

Browse files
authored
Merge pull request webpack#4107 from webpack/bugfix/issue-4086
fixes webpack#4086
2 parents 83ad4b0 + 546fe6d commit 114c2e0

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎lib/SourceMapDevToolPlugin.js‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ SourceMapDevToolPlugin.prototype.apply = function(compiler) {
4242
chunks.forEach(function(chunk) {
4343
chunk.files.filter(ModuleFilenameHelpers.matchObject.bind(undefined, options)).map(function(file) {
4444
var asset = this.assets[file];
45-
if(asset.__SourceMapDevToolData) {
45+
if(asset.__SourceMapDevToolFile === file && asset.__SourceMapDevToolData) {
4646
var data = asset.__SourceMapDevToolData;
4747
for(var cachedFile in data) {
4848
this.assets[cachedFile] = data[cachedFile];
@@ -123,6 +123,7 @@ SourceMapDevToolPlugin.prototype.apply = function(compiler) {
123123
}
124124
sourceMap.sourceRoot = options.sourceRoot || "";
125125
sourceMap.file = file;
126+
asset.__SourceMapDevToolFile = file;
126127
asset.__SourceMapDevToolData = {};
127128
var currentSourceMappingURLComment = sourceMappingURLComment;
128129
if(currentSourceMappingURLComment !== false && /\.css($|\?)/i.test(file)) {

0 commit comments

Comments
 (0)