Skip to content

Expose an option to turn off mangling #2690

Closed
@gaearon

Description

Hey! I chatted a bit with @MatrixFrog, and he asked me to file an issue.

We recently started using GCC for building React and are loving it! Unfortunately, we can only use GCC for the open source builds, and not the ones we use at Facebook.

For the Facebook builds, we could only use GCC if there was an option to turn off name mangling in simple mode. We have our own minifier, and we can’t check in minified code into the repository as it makes debugging traces very difficult. Even if we checked in sourcemaps, those wouldn’t work with our internal tooling.

Currently, we use Uglify for internal builds. It provides a mangle: false option that keeps dead code elimination and other optimizations, but doesn’t transform the names. I am asking to provide a similar option for GCC so that we can use excellent other GCC optimizations while keeping the production build source human-readable. Our ideal setup right now would be GCC in simple mode with turned off mangling + Prettier for formatting the output nicely.

I recognize options are a huge maintenance burden and totally understand if that’s not something you would consider. We would very much appreciate even an “unofficial” flag though.

Thanks.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions