beginner-corp / begin-data

A durable and fast key/value store for Begin built on top of DynamoDB
79 stars 8 forks source link

Allow using with ES6 import #79

Closed thislooksfun closed 3 years ago

thislooksfun commented 3 years ago

When trying to use @begin/data with ES6 import from syntax it would fail with the error Failed to resolve entry for package "@begin/data". The package may have incorrect main/module/exports specified in its package.json. This fixes that issue.

ryanblock commented 3 years ago

I don't believe this would work, this package relies on AWS-SDK which is not ESM. I believe @brianleroux has been working on a Deno / ESM version though.

brianleroux commented 3 years ago

Hey thx for the PR but unfortunately AWS Lambda's version of Node 14 is still VERY buggy for esmodules so we are not recommending at this time. Given the semantics have changed so much and so often we're waiting for it to be stable before committing. In the meantime you can use Deno or transpiler if you need esmodules. Thanks again for submitting!