Title: ivy-ngcc is unable to compile AngularFire due to AngularFire not following APF · Issue #2021 · angular/angularfire · GitHub
Open Graph Title: ivy-ngcc is unable to compile AngularFire due to AngularFire not following APF · Issue #2021 · angular/angularfire
X Title: ivy-ngcc is unable to compile AngularFire due to AngularFire not following APF · Issue #2021 · angular/angularfire
Description: Version info Angular: 8.0.0-beta.6 Firebase: 5.8.4 AngularFire: 5.1.1 Other (e.g. Ionic/Cordova, Node, browser, operating system): N/A See AngularFire code structure: https://unpkg.com/@angular/fire@5.1.1/ I tried using Angular Compatibi...
Open Graph Description: Version info Angular: 8.0.0-beta.6 Firebase: 5.8.4 AngularFire: 5.1.1 Other (e.g. Ionic/Cordova, Node, browser, operating system): N/A See AngularFire code structure: https://unpkg.com/@angular/fir...
X Description: Version info Angular: 8.0.0-beta.6 Firebase: 5.8.4 AngularFire: 5.1.1 Other (e.g. Ionic/Cordova, Node, browser, operating system): N/A See AngularFire code structure: https://unpkg.com/@angular/fir...
Opengraph URL: https://github.com/angular/angularfire/issues/2021
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"ivy-ngcc is unable to compile AngularFire due to AngularFire not following APF","articleBody":"\u003c!--\r\n\r\nIMPORTANT! YOU MUST FOLLOW THESE INSTRUCTIONS OR YOUR ISSUE WILL BE CLOSED.\r\n\r\nThank you for contributing to the Angular and Firebase communities!\r\n\r\nHave a usage question?\r\n=======================\r\nWe get lots of those and we love helping you, but GitHub is not the best place for them and they will be closed. Here are some resources to get help:\r\n\r\n- Go through the Developer's Guide: https://github.com/angular/angularfire2#developer-guide\r\n\r\nIf the official documentation doesn't help, try asking through our officially supported channels:\r\n\r\n- Firebase Google Group: https://groups.google.com/forum/#!forum/firebase-talk\r\n- Stack Overflow: https://stackoverflow.com/questions/tagged/angular (include the firebase and angularfire tags, too!)\r\n\r\n*Please avoid double posting across multiple channels!*\r\n\r\nThink you found a bug?\r\n=======================\r\nYeah, we're definitely not perfect! Please use the bug report template below and include a minimal repro when opening the issue.\r\n\r\nHave a feature request?\r\n========================\r\nGreat, we love hearing how we can improve our products! Remove the template below and\r\nprovide an explanation of your feature request. Provide code samples if applicable. Try to\r\nthink about what it will allow you to do that you can't do today? How will it make current\r\nworkarounds straightforward? What potential bugs and edge cases does it help to avoid?\r\n\r\n--\u003e\r\n\r\n\r\n### Version info\r\n\r\n\u003c!-- What versions of the following libraries are you using? Note that your issue may already\r\nbe fixed in the latest versions. --\u003e\r\n\r\n**Angular:** 8.0.0-beta.6\r\n\r\n**Firebase:** 5.8.4\r\n\r\n**AngularFire:** 5.1.1\r\n\r\n**Other (e.g. Ionic/Cordova, Node, browser, operating system):** N/A\r\n\r\nSee AngularFire code structure: https://unpkg.com/@angular/fire@5.1.1/\r\n\r\nI tried using Angular Compatibility Compiler to compile AngularFire. The ES2015 is compiled correctly. But ESM5 is not compiled.\r\n\r\nDuring FESM5 pass, `ivy-ngcc` will parse index.js in the library root, because that is specify in `module` field in `package.json`.\r\n\r\nUnfortunately, during `ts.createProgram` call in `makeBundleProgram`, TypeScript cannot load file `public_api.js` that is specified in `index.js`. This is due to the resolve order of TypeScript. It goes `.ts`, `.tsx`, `.d.ts`, `.js`, `.jsx`. (Reference [1](https://github.com/Microsoft/TypeScript/blob/b534fb4849eca0a792199fb6c0cb8849fece1cfd/src/compiler/moduleNameResolver.ts#L868) and [2](https://github.com/Microsoft/TypeScript/blob/b534fb4849eca0a792199fb6c0cb8849fece1cfd/src/compiler/moduleNameResolver.ts#L878)) TypeScript finds `public_api.d.ts` first, as it also resides in the library root.\r\n\r\nThis problem will not occur if AngularFire decide to follow Angular Package Format.\r\n\r\n1. `module` key is meant for **flattened ESM5**.\r\n2. Keep the flattened ESM5 in a separate folder\r\n\r\nI believe this cannot be fixed in the `ivy-ngcc` itself, since the order of file resolving is hard coded in TypeScript library. So, the best course of action would be turning AngularFire to match the Angular Package Format.\r\n\r\nI can do the PR to fix this, but I want some approval before doing so.\r\n\r\nPlease take a look and let me know what I can help. ","author":{"url":"https://github.com/sarunint","@type":"Person","name":"sarunint"},"datePublished":"2019-03-05T21:12:10.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":5},"url":"https://github.com/2021/angularfire/issues/2021"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:38e4bbf3-23cd-05ed-bc5f-9645d2874292 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8450:2612C6:1369988:1921528:6A5B0E6C |
| html-safe-nonce | c3aee8c240898a827a16612b3c6275a1a3fc2bdea139d104b4ae030818a5c2b4 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4NDUwOjI2MTJDNjoxMzY5OTg4OjE5MjE1Mjg6NkE1QjBFNkMiLCJ2aXNpdG9yX2lkIjoiMzg5NTM1MjQ1MDk1ODk1NDA5MiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 7d7155b1512e7921235f0625a2e766a5517a76e309a4c48a19a86839535a748b |
| hovercard-subject-tag | issue:417503348 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/angular/angularfire/2021/issue_layout |
| twitter:image | https://opengraph.githubassets.com/471541e0f519af4d06413c94bc1647a6711d32b19cff391b0c4c1ad120a9359e/angular/angularfire/issues/2021 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/471541e0f519af4d06413c94bc1647a6711d32b19cff391b0c4c1ad120a9359e/angular/angularfire/issues/2021 |
| og:image:alt | Version info Angular: 8.0.0-beta.6 Firebase: 5.8.4 AngularFire: 5.1.1 Other (e.g. Ionic/Cordova, Node, browser, operating system): N/A See AngularFire code structure: https://unpkg.com/@angular/fir... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | sarunint |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5290d7e14309ad1e76106a9c4237bd1041517e83ea182c8ab756752cb0c6940b |
| turbo-cache-control | no-preview |
| go-import | github.com/angular/angularfire git https://github.com/angular/angularfire.git |
| octolytics-dimension-user_id | 139426 |
| octolytics-dimension-user_login | angular |
| octolytics-dimension-repository_id | 49453413 |
| octolytics-dimension-repository_nwo | angular/angularfire |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 49453413 |
| octolytics-dimension-repository_network_root_nwo | angular/angularfire |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 9c975978430e9ad293956f2bbdaf153b1bd84a99 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width