refactor: remove extendedConfig.devtool check

This commit is contained in:
Clark Du 2018-12-12 10:10:24 +00:00
parent 8d728da3c7
commit 28300ee0f9

View File

@ -408,7 +408,7 @@ export default class WebpackBaseConfig {
if (optimization && optimization.minimizer && extendedConfig.devtool) {
const terser = optimization.minimizer.find(p => p instanceof TerserWebpackPlugin)
if (terser) {
terser.options.sourceMap = extendedConfig.devtool && /source-?map/.test(extendedConfig.devtool)
terser.options.sourceMap = /source-?map/.test(extendedConfig.devtool)
}
}