Minification can break code (but cannot be disabled?)
See original GitHub issueIn metro
@0.24.7 (react-native
@0.53.3), src/JSTransformer/worker/minify.js
, and presumably in the latest version in metro-minify-uglify
, the setting mangle:{toplevel:true}
is passed to uglify-es
. Unfortunately, this can break code—we have some stuff that breaks if certain React component names are mangled. Our web version uses a blacklist via mangle:{reserved}
; with metro
, we have to patch the transformer to stop breaking our app.
It would be great if uglify options could be configured for the transformer.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:12
- Comments:15 (1 by maintainers)
Top Results From Across the Web
angular cli - AngularCli: disable minification - Stack Overflow
C'est genial :-D I was trying to find out, what setting is responsible for file minification in published Angular site, specifically on ...
Read more >some minify issue - WordPress.org
Hello mate, I am having a small issue with FVM, I have recently installed a plugin named WooCommerce Product Categories Selection, I have...
Read more >What is Minification and why is it Wreaking Havoc
One popular practice is to minify that code. Minifying your code is usually safe, but if you're not careful it can cause problems....
Read more >Using code minification and compression | Kentico 12 Service ...
You can enable or disable code minification and compression globally for all sites in Settings -> System -> Performance, through the settings ...
Read more >Minification - WP-Optimize - FAQs
Pressing the “Reset the minified files” does: ... The previously minified CSS files will remain on the server until they expire, or until...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@chiaraperino you can’t turn off mangle. don’t even try. try to do this:
yarn add -dev metro-minify-terser
worked for me. The problem was in metro-minify-uglify. it works over uglify-es when the latter works over terser.
using typeorm with react-native-sqlite-storage to build offline app. As i see it minifier.js brakes my code. I have error in release but no in dev mode. When i retured _ref from minify func i didn’t have error either.