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.

Use ngDevMode to tree shake error messages in pipes

See original GitHub issue

🚀 feature request

Description

Currently all the errors throwed by pipes are not being tree-shaked in production mode.

Relevant Package

@angular/common/(pipes)

Example: https://github.com/angular/angular/blob/884f743baa667ee5b62d67c3fb9dabab1b03d2d8/packages/common/src/pipes/case_conversion_pipes.ts#L37-L39

Describe the solution you’d like

I have seen that you made a lot of progress with ngDevMode, so I think it would be a case of using it for the purpose of making the package smaller.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:10 (8 by maintainers)

github_iconTop GitHub Comments

3reactions
alan-agius4commented, Dec 13, 2020

Actually never mind, I just noticed that the check in https://github.com/angular/angular/blob/884f743baa667ee5b62d67c3fb9dabab1b03d2d8/packages/common/src/pipes/case_conversion_pipes.ts#L36 is using double = and not triple.

So you are right 😊

1reaction
ramthircommented, Jan 7, 2022

I think it should be safe to tree-shake away this error in prod mode (in all pipes within the case_conversion_pipes.ts script).

@ramthir this looks similar to other changes you made recently. Please let us know if you might be interested in helping with this code?

Great @AndrewKushnir, I’ll raise a PR on this. 👍

Read more comments on GitHub >

github_iconTop Results From Across the Web

Angular tree shaking not stripping dev code, what things ...
I tried using that exact code in my app, but the dev code is still there in a production build. I copied the...
Read more >
What's new in Angular 11? - Reseller News
To improve router performance, ngDevMode can be used to tree-shake error messages. For service-worker, an UnrecoverableStateError ...
Read more >
What's new in Angular 11? - ARN
To improve router performance, ngDevMode can be used to tree-shake error messages. For service-worker, an UnrecoverableStateError notification is being ...
Read more >
What's new in Angular 11 | InfoWorld
To improve router performance, ngDevMode can be used to tree-shake error messages. For service-worker, an UnrecoverableStateError ...
Read more >
Angular 11 Officially Released!. Compiler, routes, supports. Just ...
Paying attention also to router performance, ngDevMode can be used to tree-shake error messages and the type of parameter in “navigateByUrl” and ...
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