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
Bug report
The title of this issue is probably confusing along with the below description, so just look at the example code.
Mangling props for multiple files results in an inconsistent output when the mangled name chosen automatically for a property collides with an existing unmangled property name.
In the below example, the property i is specifically chosen as it is one of the first property names chosen by terser for a minified prop name.
Bug report
The title of this issue is probably confusing along with the below description, so just look at the example code.
Mangling props for multiple files results in an inconsistent output when the mangled name chosen automatically for a property collides with an existing unmangled property name.
In the below example, the property
i
is specifically chosen as it is one of the first property names chosen by terser for a minified prop name.Version (complete output of
terser -V
)HEAD
Complete CLI command or
minify()
options usedterser
inputExisting file:
./first.js
Existing file:
./second.js
Empty file:
./cache.json
Run
./bin/uglifyjs -c -m --mangle-props --name-cache cache.json -- first.js > first.min.js
Run
./bin/uglifyjs -c -m --mangle-props --name-cache cache.json -- second.js > second.min.js
terser
output or error./first.min.js
:function fn1(n){n.i=1,n.o=5}
./second.min.js
:function fn2(n){n.i=1,n.i=5}
Expected result
second.min.js
should be:function fn2(n){n.i=1,n.o=5}
.i
should have become a.o
The text was updated successfully, but these errors were encountered: