uglifyjs2 - How do you pass the --mangle-regex option to uglify using gulp-uglify? -


i'm trying use --mange-regex option documented on uglifyjs2's github readme. problem is, build uses gulp-uglify, , isn't documented how should use --mangle-regex without command line.

my goal mangle 'private' identifiers (matching /^_/)

i've tried:

// gulp setup code left out brevity (i'm using gulp.src() etc properly) uglify({     mangle: {         toplevel: false     },     mangleproperties: {         regex: /^_/     } }); 

and

// gulp setup code left out brevity (i'm using gulp.src() etc properly) uglify({     mangle: {         regex: /^_/     } }); 

nothing's doin' here. little help?

turns out feature enabled in master branch of uglify of writing. correct syntax, be:

uglify({     mangleproperties: {         regex: /^_/     } }); 

Comments

Popular posts from this blog

authentication - Mongodb revoke acccess to connect test database -

r - Update two sets of radiobuttons reactively - shiny -

ios - Realm over CoreData should I use NSFetchedResultController or a Dictionary? -