-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Description
I feel a bit dumb for not finding the option...
I am using UglifyJS through html-minifier and I would like to mangle property names. What is the way to go? this is my uglifyjs config that I use in WebPack and the minifier. I want to go down as much as I can, and part of that is mangling property names.
module.exports = {
compress: {
warnings: false,
properties: true,
sequences: true,
dead_code: true,
conditionals: true,
comparisons: true,
evaluate: true,
booleans: true,
unused: true,
loops: true,
hoist_funs: true,
cascade: true,
if_return: true,
join_vars: true,
//drop_console: true,
drop_debugger: true,
unsafe: true,
hoist_vars: true,
negate_iife: true,
},
//sourceMap: true,
mangle: {
toplevel: true,
sort: true,
eval: true,
props: true // <-- Seemed to have no effect...
},
output: {
space_colon: false,
comments: function(node, comment) {
var text = comment.value;
var type = comment.type;
if (type == "comment2") {
// multiline comment
return /@copyright/i.test(text);
}
}
}
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels