Auth is not a function when using compatibility in production build
- Ngôn ngữ chính
- TypeScript
- Star
- 7.8k
- Fork
- 2.2k
- Merge trung bình
- 22 giờ 28 phút
- Pull request đã merge (30 ngày)
- 6
Mô tả
### 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
Hướng dẫn đóng góp
Hướng nghiên cứu
Tái hiện production build được mô tả trong issue, bắt đầu từ main.ts:16 và lỗi tại angular-fire-compat-auth.js:59. So sánh các bundle development và production để xác định lý do compatibility auth API bị thiếu. Hoàn thành nghĩa là authentication được khởi tạo thành công trong cả production build và development.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- angular, firebase, typescript
- Lĩnh vực
- authentication, build-system, frontend
- Loại issue
- Lỗi
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 30/100