I'm trying to use the --mange-regex
option which is documented on UglifyJS2's GItHub README. The problem is, my build uses gulp-uglify
, and it isn't clearly documented how I should use --mangle-regex
without the command line.
My goal is to mangle 'private' identifiers (matching /^_/
)
I've tried:
// Gulp setup code left out for brevity (I'm using gulp.src() etc properly)
uglify({
mangle: {
toplevel: false
},
mangleProperties: {
regex: /^_/
}
});
and
// Gulp setup code left out for brevity (I'm using gulp.src() etc properly)
uglify({
mangle: {
regex: /^_/
}
});
Nothing's doin' here. A little help?