Replies: 1 comment 2 replies
-
IIUC that can only happen if there is a circular dependency which is not the case for Did you actually encounter this error in your app? |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
While other modules work with ES modules based browsers,
@firebase/performance
(0.900.17) needs some changes.With ESM, one shouldn't do dynamic initialisation in the module body with classes that themselves are imported. The current code does this at places, causing errors like "Cannot access
ErrorFactory
before initialisation" to arise, at runtime.Here are the places where I stabbed
node_modules/@firebase/performance/dist/index.esm2017.js
to get by them.Note: Actual changes should be carefully though after by Firebase authors. I am merely listing the work-arounds. Preceding code is in the comments.
Edit:
I complemented some of the snippets that had remain partial, and added a wrapper for
initializePerformanceWrapper
(shot myself in the foot by having changed to using it!).Beta Was this translation helpful? Give feedback.
All reactions