You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to mangle all non-builtin properties and a few built-in properties, and reserve most of built-in properties.
Currently I have no easy way to config the option, since I have to list every property names which need mangle or list every ones which need to be reserved.
It will be much easier to set option if there is a list with a few built-in properties to be reserved.
For example, I have 10 non-builtin property names and 10 builtin property names. My purpose is mangle the all 10 non-builtin property names and 1 builtin property names. An expected easier option is like this:
mangle: {properties: {builtins: ['value'],// only mangle this one builtin and all non-builtin property names},},
instead of current
mangle: {properties: {builtins: true,reserved: ['width','height','target','name','id','style','parent','self','top'],// all reserved builtins},},
or
mangle: {properties: {builtins: true,regex: /^(value|foo|bar|hello|world|example|github|terser)$/,// all non-builtin and a few builtins},},
Version
Latest
Complete CLI command or minify() options used
{module: true,compress: {},mangle: {properties: {builtins: ['value'],// only boolean value is supported, so this is equals to `true`},},output: {beautify: true,},parse: {},rename: {},}
Bug report or Feature request?
Feature request
I want to mangle all non-builtin properties and a few built-in properties, and reserve most of built-in properties.
Currently I have no easy way to config the option, since I have to list every property names which need mangle or list every ones which need to be reserved.
It will be much easier to set option if there is a list with a few built-in properties to be reserved.
For example, I have 10 non-builtin property names and 10 builtin property names. My purpose is mangle the all 10 non-builtin property names and 1 builtin property names. An expected easier option is like this:
instead of current
or
Version
Latest
Complete CLI command or
minify()
options usedterser
inputterser
output or errorExpected result
The text was updated successfully, but these errors were encountered: