Skip to content

Commit 546fe6d

Browse files
committed
fixes webpack#4086
1 parent 5b47228 commit 546fe6d

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)