Skip to content

Commit 90dbb2b

Browse files
committed
2 parents f0406f3 + 9bcc372 commit 90dbb2b

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# config-uglify

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
"ava": "^0.15.2",
3333
"greenkeeper-postpublish": "^1.0.0",
3434
"semantic-release": "^4.3.5",
35-
"ts-node": "^0.9.1",
35+
"ts-node": "^1.1.0",
3636
"tslint": "^3.11.0",
3737
"tslint-config-standard": "^1.2.2",
3838
"typescript": ">=1.9.0-dev.20160619-1.0 || ^2.0.0"

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)