提交 37001b38 编写于 作者: F Fritz 提交者: kyle

build(umd-module): prevent mangling (#4320)

* Prevent mangling of names in UMD distribution

This makes debugging easier in general.

* use `uglifyOptions`
上级 32ab8b3c
......@@ -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,
},
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册