FingerprintAuth is not defined


I am using FingerprintAuth in my ionic2 application. Here’s an excerpt of my code:

declare var FingerprintAuth: any;

   selector: 'login-page',
   templateUrl: './login.component.html'     
  export class LoginComponent {

  constructor(private _auth: Auth ) { }

 showFingerprintAndroid() {
     FingerprintAuth.isAvailable(function (result) {

Everything works fine on the device if I compile in dev mode :

"build": "ionic-app-scripts build --dev"

However if I build in prod mode, using AOT :

"build": "ionic-app-scripts build"

I get a runtime error FingerprintAuth is not defined

I don’t understand why. Can someone help ?