build(umd-module): prevent mangling (#4320)
* Prevent mangling of names in UMD distribution This makes debugging easier in general. * use `uglifyOptions`
This commit is contained in:
@@ -52,6 +52,7 @@ module.exports = function(rules, options) {
|
||||
hot: false,
|
||||
separateStylesheets: true,
|
||||
minimize: false,
|
||||
mangle: false,
|
||||
longTermCaching: false,
|
||||
sourcemaps: false,
|
||||
}, options._special)
|
||||
@@ -69,6 +70,10 @@ module.exports = function(rules, options) {
|
||||
|
||||
plugins.push(
|
||||
new UglifyJsPlugin({
|
||||
uglifyOptions: {
|
||||
mangle: specialOptions.mangle,
|
||||
beautify: !specialOptions.mangle,
|
||||
},
|
||||
sourceMap: true,
|
||||
}),
|
||||
new webpack.LoaderOptionsPlugin({
|
||||
|
||||
@@ -20,6 +20,7 @@ module.exports = require("./make-webpack-config.js")(rules, {
|
||||
_special: {
|
||||
separateStylesheets: true,
|
||||
minimize: true,
|
||||
mangle: true,
|
||||
sourcemaps: true,
|
||||
},
|
||||
|
||||
|
||||
@@ -20,6 +20,7 @@ module.exports = require("./make-webpack-config.js")(rules, {
|
||||
_special: {
|
||||
separateStylesheets: true,
|
||||
minimize: true,
|
||||
mangle: true,
|
||||
sourcemaps: true,
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user