Skip to content

Mangle option debug produces syntax error for private properties #5966

@AshleyScirra

Description

@AshleyScirra

Uglify version (uglifyjs -V) 3.19.3

JavaScript input

class Test {
	#test;
}

The uglifyjs CLI command executed or minify() options used.

uglifyjs input.js --mangle-props debug --beautify --output output.js

JavaScript output or error produced.

class Test {
    #_$#test$_;
}

The output code is a syntax error because it includes the character # twice: the private property was renamed to #_$#test$_ instead of #_$test$_.

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