Search code examples
angulartypescriptfirebaseangularfire

ye.auth is not a function @angular/fire


I'm using Angular and Firebase to do authentication. It's working perfectly fine locally with no issues. However, when I deploy my application to Netlify and I'm getting an error:

Uncaught TypeError: ye.auth is not a function

If I try and login on the built version that same error appears.

enter image description here


Solution

  • The issue is to do with having optimization: true. Setting this to false fixes the issue but dramatically increases your bundle size.

    https://github.com/angular/angularfire/issues/3221