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
Post a Comment