minified constructor parameter names after production-build
See original GitHub issueDescription
Some packaging-for-production-distribution libraries, such as react-scripts (used by create-react-app), pkg (Node Binary Packager), minify JS file on its variable names. With it constructor parameter names are not preserved. It makes @JsonProprty()
on constructor parameters not working.
Any idea on this?
Issue Analytics
- State:
- Created 4 years ago
- Comments:10 (10 by maintainers)
Top Results From Across the Web
Angular-cli : How to ignore class names from being minified
Angular cli builder supports NG_BUILD_MANGLE , NG_BUILD_MINIFY , NG_BUILD_BEAUTIFY node environment params (checked in version 8).
Read more >constructor.name is not working in production
At this process webpack minifiere converts class name to short name, and thus you can not get real class name by constructor.name in...
Read more >Removing assertions from production build with Vite - Battlefy
After Vite performs a build, we can inspect the output. Note, minification has been turned off to make it easier to understand what...
Read more >Optimizing Performance - React
If you're benchmarking or experiencing performance problems in your React apps, make sure you're testing with the minified production build.
Read more >constructor - JavaScript - MDN Web Docs - Mozilla
If your class is a derived class, the default constructor calls the parent constructor, passing along any arguments that were provided:.
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 Free
Top 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
Hi,
If I try to use decorators in CRA project, when I try to get design:type it always returns
undefined
and break my lib.You don’t have any errors on your side ? If no, how did you do that ? ^^’
PS: It seems to be a Babel limitation
It’s good for me. Thanks.