Skip to content

Maybe bug, or config problem? Inline object keys-value pairs #910

@Jurek-Raben

Description

@Jurek-Raben

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....

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions