question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

minified constructor parameter names after production-build

See original GitHub issue

Description

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:closed
  • Created 4 years ago
  • Comments:10 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
GillianPerardcommented, Jun 29, 2019

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.

Capture d’écran 2019-06-29 à 08 39 28

You don’t have any errors on your side ? If no, how did you do that ? ^^’

PS: It seems to be a Babel limitation

0reactions
civilizeddevcommented, Jul 2, 2019

It’s good for me. Thanks.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found