Auth is not a function when using compatibility in production build
- Linguagem predominante
- TypeScript
- Estrelas
- 7.8k
- Forks
- 2.2k
- Merge médio
- 22h 28min
- PRs com merge (30d)
- 6
Descrição
### Version info
**Angular:** 13.3.0
**Firebase:** ^9.8.1
**AngularFire:** 7.3.0
**Other (e.g. Ionic/Cordova, Node, browser, operating system):**
### How to reproduce these conditions
**Steps to set up and reproduce**
When a production build is served, we have an error with Firebase app.auth() is not found. This does not happen with a development build.
We are using the compatibility version of Angular Fire.
### Debug output
** Errors in the JavaScript console **
> main.ts:16 TypeError: Bt.auth is not a function
> at angular-fire-compat-auth.js:59:51
> at rr.invoke (zone.js:409:30)
> at rr.run (zone.js:169:47)
> at value (core.mjs:25486:28)
> at angular-fire-compat-auth.js:59:23
> at tn (angular-fire-compat.js:147:29)
> at we (angular-fire-compat-auth.js:58:116)
> at new Ue (angular-fire-compat-firestore.js:513:13)
> at Object.$e.ɵfac [as factory] (angular-fire-compat-firestore.js:584:1)
> at value (core.mjs:11477:35)
### Expected behavior
Build runs on both development and production
### Actual behavior
Build runs only in development
Guia de contribuição
Direção de pesquisa
Reproduza o production build descrito na issue, começando em main.ts:16 e pela falha em angular-fire-compat-auth.js:59. Compare os bundles de desenvolvimento e de produção para identificar por que a API de autenticação de compatibilidade está ausente. Considera-se concluído quando a autenticação é inicializada com sucesso tanto em um production build quanto em desenvolvimento.
Escrita pelo modelo de indexação a partir do texto da issue.
Avaliação
- Stack de tecnologia
- angular, firebase, typescript
- Domínio
- authentication, build-system, frontend
- Tipo de issue
- Bug
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Status de atividade
- Estagnada
- Clareza
- Razoavelmente clara
- Facilidade para iniciantes
- 30/100