Expose an option to turn off mangling
See original GitHub issueHey! 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.
Issue Analytics
- State:
- Created 6 years ago
- Comments:17 (10 by maintainers)
Top GitHub Comments
I believe parsing is considerably slower. Stack traces from compiler crashes are not great. All the core devs work with the Java version.
The JS version is definitely viewed as experimental. While it’s the same core code base that gets transpiled down, there is logic that cannot be shared. Particularly the logic around flags and starting a compile job. It’s always just the last piece that gets attention.
There are also advanced features (such as restricting code patterns) that are simply not available in JS version.
Fixed via #2707.