I found bug when using storage in web worker, it always fallback to nodefs no matter what storage we use. turns out, when we initialize PGLiteWorker, we parse dataDir
now dataDir is the parsed value, for example from idb://my-database to only /my-database without idb://. then when we initialize the worker, we are using parsed value instead the the raw value, and this value will be parsed again in PGLite
I found bug when using storage in web worker, it always fallback to
nodefs
no matter what storage we use. turns out, when we initializePGLiteWorker
, we parsedataDir
now
dataDir
is the parsed value, for example fromidb://my-database
to only/my-database
withoutidb://
. then when we initialize the worker, we are using parsed value instead the the raw value, and this value will be parsed again inPGLite
so no mattter what storage used in web worker, it's always using
nodefs
, because we always parsing the parsed value toPGLite