Closed jgoux closed 2 months ago
Yep, I'm happy to make that change. I've seen similar things before although of the top of my head I'm not sure what triggers it (I tempted to blame CJS vs EMS...)
I tempted to blame CJS vs EMS...
It's always CJS vs ESM. 🥲
Fixed in v0.1.2
Hello 👋,
I'm experimenting with
pglite
for an upcoming adapter for@snaplet/seed
.I'm not exactly sure why, but
default
is undefined when it hits this line: https://github.com/electric-sql/pglite/blob/a88952002b09bb06805d1fc137a6bdad00c62355/packages/pglite/src/utils.ts#L11My setup is quite complicated as I define the
PGlite()
connection within a TypeScript configuration file loaded through https://github.com/unjs/c12 😅But everything seems to work if I remove
default
and directly consumecreateRequire
like this:Do you think it would be possible to have a fallback so it works in both cases: