Using the Node URL API to resolve a file URL to a path works, but I understand that the PGLite code works across multiple environments so either we need to polyfill this API or write our own implementation of something that works around this issue (like a very ugly regex?)
Fixes https://github.com/electric-sql/pglite/issues/34
The
import.meta.url
call resolves to a path that starts with a forward slash, that Windows cannot handle. (see https://github.com/nodejs/node/issues/37845)Using the Node URL API to resolve a file URL to a path works, but I understand that the PGLite code works across multiple environments so either we need to polyfill this API or write our own implementation of something that works around this issue (like a very ugly regex?)