Skip to content
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

@angular-devkit/build-angular removes custom library decorators from another libraries on production build #15301

Closed
1 of 15 tasks
abadakhshan opened this issue Aug 11, 2019 · 3 comments · Fixed by #15303
Closed
1 of 15 tasks

Comments

@abadakhshan
Copy link

abadakhshan commented Aug 11, 2019

🐞 Bug report

  • new
  • build
  • serve
  • test
  • e2e
  • generate
  • add
  • update
  • lint
  • xi18n
  • run
  • config
  • help
  • version
  • doc

I define some decorators on one of my libraries and use them a lot on other libraries.
When I build my application with --prod Angular compiler removes using of them in generated code.

This problem occurs with @angular-devkit/[email protected] and I have no problem with @angular-devkit/[email protected]

@abadakhshan
Copy link
Author

abadakhshan commented Aug 11, 2019

I created a repository for demo

https://github.com/abadakhshan/test-build-angular

I have a decorator on "narik-core" (@NarikInject).
Every @NarikInject used in "test-build-angular" source, works fine but those that used in libraries (for example in "narik-core" and "narik-app-core") do not work at all.

If I change "@angular-devkit/build-angular" to "0.801.3" and "typescript" to "3.4.5" everything is OK.

This happens on ng build --prod and there is no problem on "ng serve"

@abadakhshan abadakhshan changed the title @angular-devkit/build-angular removes custom library decorators on production build @angular-devkit/build-angular removes custom library decorators from another libraries on production build Aug 11, 2019
@ngbot ngbot bot modified the milestone: needsTriage Aug 11, 2019
@ngbot ngbot bot modified the milestones: needsTriage, Backlog Aug 11, 2019
@alan-agius4
Copy link
Collaborator

Similar things have also been reported here: ng-packagr/ng-packagr#1307

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 13, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants