We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents f916fc0 + 17d03c1 commit 6970103Copy full SHA for 6970103
lib/WebpackOptionsDefaulter.js
@@ -264,10 +264,14 @@ class WebpackOptionsDefaulter extends OptionsDefaulter {
264
apply: compiler => {
265
// Lazy load the uglifyjs plugin
266
const UglifyJsPlugin = require("uglifyjs-webpack-plugin");
267
+ const SourceMapDevToolPlugin = require("./SourceMapDevToolPlugin");
268
new UglifyJsPlugin({
269
cache: true,
270
parallel: true,
- sourceMap: options.devtool && /source-?map/.test(options.devtool)
271
+ sourceMap:
272
+ (options.devtool && /source-?map/.test(options.devtool)) ||
273
+ (options.plugins &&
274
+ options.plugins.some(p => p instanceof SourceMapDevToolPlugin))
275
}).apply(compiler);
276
}
277
0 commit comments