-
Notifications
You must be signed in to change notification settings - Fork 29
minified constructor parameter names after production-build #36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hi! For the moment I haven’t. Could you try to pass the real json name to JsonProperty ? constructor(@JsonProperty(‘name’) public name: string) {} |
Hi, thank you for the PR, I'll test it as soon as possible. Could you just provide me how did you test with a minifier please ? |
Steps to reproduce
|
I think it is good to prepare the minified code before the test phase starts. |
Thanks for the test flow. Honestly I don't know, let me check. |
I'm looking forward to hearing from you. |
No, it works very well on my side. I made a pull request for poc of this. |
Hi, I made some modifications and it works for CRA but it still not work for angular. I'm investigating. EDIT: I've checked and it seems that AOT removes custom decorators from constructor and there is no solution for the moment, then Angular users may only use |
It's good for me. Thanks. |
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?
The text was updated successfully, but these errors were encountered: