I am trying to build using command npm run build:ssr for my Angular application. Application built successfully done, But at the time of running command npm run serve:ssr I'm getting this error -
ReferenceError: IDBIndex is not defined
PS: As per my finding issue is with firebase package I am using. I wrapped the whole content under the check if (isPlatformBrowser(this.platform)) {} but still getting error.
Probably this line of import
import { openDb, deleteDb } from 'idb';
is causing issue, can anyone help.
Do I need to import idb dynamically?
PPS: I have already check this answer but not working for me