deptyped / prisma-extension-pagination

Prisma Client extension for pagination
https://npmjs.com/prisma-extension-pagination
MIT License
243 stars 18 forks source link

Default export doesn't work with ESM modules #20

Closed jamesmoss closed 11 months ago

jamesmoss commented 11 months ago

We're using ESM modules in Node v18, the default export isn't working properly so it's not possible to import the extension correctly and use it. Using the example at the top of the readme gives the error "pagination is not a function".

I've recreated the issue here https://codesandbox.io/p/devbox/recursing-swartz-zyffh8?file=%2Findex.mjs%3A5%2C1

The named exports are working fine, if we can add the extension as a named export that would solve the issue.

deptyped commented 11 months ago

Named export for extension available since 0.6.0. Thanks for the bug report!