Given such a code structure:
const SomeManager = (someParameter) => ({
addUsedKey(key: string): boolean {
...
usedEntries.push({ key: key });
}
});
The minifier will fail at { key: key } leaving the value name untouched, so still { key: key }. But the value name is the function parameter, which has been shortened.
I am not sure if this is a general problem with object key-value pairs, or because of the maybe uncommon base structure of the SomeManager, just returning an object with methods.
Btw. also doesn't work, if the parameter/value name is different than "key".
Do you think it's a configuration problem? I set --js-version 2020 only....
Given such a code structure:
The minifier will fail at
{ key: key }leaving the value name untouched, so still{ key: key }. But the value name is the function parameter, which has been shortened.I am not sure if this is a general problem with object key-value pairs, or because of the maybe uncommon base structure of the SomeManager, just returning an object with methods.
Btw. also doesn't work, if the parameter/value name is different than "key".
Do you think it's a configuration problem? I set
--js-version 2020only....