Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compress privateIdentifier by default #955

Closed
LongTengDao opened this issue Mar 11, 2021 · 1 comment
Closed

compress privateIdentifier by default #955

LongTengDao opened this issue Mar 11, 2021 · 1 comment

Comments

@LongTengDao
Copy link
Contributor

Bug report or Feature request? feature request

Version (complete output of terser -V or specific git commit) 5.6.0

Complete CLI command or minify() options used

terser input

console.log(class {
    #outer = 0;
    static inner = class {
        #inner = 0;
        method (outer) { return outer.#outer + this.#inner; }
    };
});

terser output or error

console.log(class {
    #outer = 0;
    static inner = class {
        #inner = 0;
        method (a) { return a.#outer + this.#inner; }
    };
});

Expected result

console.log(class {
    #a= 0;
    static inner = class {
        #b = 0;
        method (a) { return a.#a + this.#b; }
    };
});

NOTE: keep away for#constructor, because that's special in spec.

@LongTengDao LongTengDao changed the title compress privateIdentifier compress privateIdentifier by default Mar 11, 2021
@jridgewell
Copy link
Collaborator

Apologies, fixed by  #1060

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants