No animation on ngbCollapse in Angular 11.1 in production build

Bug description:

Since upgrade to Angular 11.1, ngbCollapse elements get no animation when built for production (ng build –prod).
Other directives like ngbTooltip work as usual.
Animation works regular in dev build even for ngbCollapse.

Link to minimally-working StackBlitz that reproduces the issue:

Don’t know how to issue a production build on StackBlitz

Versions of Angular, ng-bootstrap and Bootstrap:

Angular 11.1.0
ng-bootstrap 9.0.2

1 possible answer(s) on “No animation on ngbCollapse in Angular 11.1 in production build

  1. Trying to debug a little, I find out that after optimization the value of ngbCollapsingTransition at this line results undefined

    private _runTransition(collapsed: boolean, animation: boolean) {
    return ngbRunTransition(
    this._zone, this._element.nativeElement, ngbCollapsingTransition,
    {animation, runningTransition: ‘stop’, context: {direction: collapsed ? ‘hide’ : ‘show’}});
    }

    Hope it helps.