-
-
Notifications
You must be signed in to change notification settings - Fork 179
fix(index): ensure to nullify inputSourceMap
if sourcemap
is unavailable (devtool
)
#169
Conversation
], | ||
"sources": Array [ | ||
"/home/evilebottnawi/IdeaProjects/uglifyjs-webpack-plugin/test/fixtures/entry.js", | ||
], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will always fail somewhere else with an absolute file path
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@d3viant0ne fixed
6af0832
to
75b0138
Compare
src/index.js
Outdated
input = asset.source(); | ||
} | ||
if (this.options.sourceMap && asset.sourceAndMap) { | ||
const sourceAndMap = asset.sourceAndMap(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const { source, map } = asset.sourceAndMap();
input = source;
inputSourceMap = map;
sourceMap = new SourceMapConsumer(inputSourceMap);
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does webpack >= v2.0.0
already support this convenience method ? So the else
branch is really legacy
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@michael-ciniawsky need investigate
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
src/index.js
Outdated
sourceMap = new SourceMapConsumer(inputSourceMap); | ||
} else { | ||
input = asset.source(); | ||
inputSourceMap = null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the [windows related] fix ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@michael-ciniawsky no, when devtool
set to null we don't have map
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@evilebottnawi Sure, but this is nevertheless the fix for the parallel source maps bug :) ? It doesn't seem related to options.parallel
exclusively then, should we better reframe the commit message ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@michael-ciniawsky in this commit i just simplify logic and add tests to make sure that everything works and the problem is not in the plugin
options.parallel
)
options.parallel
)inputSourceMap
if sourcemap
is unavailable (devtool
)
@evilebottnawi Status 😛 ? Could you address the style nit, so we can get this in or is anything blocking this PR ? |
…ailable (`devtool`)
75b0138
to
03a7223
Compare
@michael-ciniawsky done 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thx
Notable Changes
Issues