Skip to content

Commit 026fe4c

Browse files
dweber019niieani
authored andcommitted
feat(index) make mangle option configurable (#4)
1 parent ab991c3 commit 026fe4c

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/index.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import * as webpack from 'webpack'
88
*
99
* See: https://webpack.github.io/docs/list-of-plugins.html#uglifyjsplugin
1010
*/
11-
export = function uglify({debug = false, exclude = []} = {}) {
11+
export = function uglify({debug = false, exclude = [], mangle = {screw_ie8 : true, keep_fnames: true}} = {}) {
1212
return function uglify(this: WebpackConfig): WebpackConfig {
1313
const options = debug ? {
1414
beautify: true, //debug
@@ -27,10 +27,7 @@ export = function uglify({debug = false, exclude = []} = {}) {
2727
} : {
2828
beautify: false, //prod
2929

30-
mangle: {
31-
screw_ie8 : true,
32-
keep_fnames: true
33-
}, //prod
30+
mangle: mangle, //prod
3431

3532
exclude: exclude,
3633

0 commit comments

Comments
 (0)