When I try to initialize Firebase Cloud Firestore, I ran into the following error:
Uncaught TypeError: WEBPACK_IMPORTED_MODULE_0_firebase
In my case the problem was that I've accidentally added firebase-admin alongside with the firebase package in my package.json. And firebase-admin took precedence so even after adding the imports as per the accepted answer I was still getting the same error.
Removing the redundant firebase-admin from the client app fixed the problem.
As a note, firebase-admin is intended for server side to operate in admin mode, while the firebase package is a client side library.