js-sdk icon indicating copy to clipboard operation
js-sdk copied to clipboard

Support for ESM Modules

Open rhamzeh opened this issue 1 year ago • 2 comments

Please do not report security vulnerabilities here. See the Responsible Disclosure Program.

Thank you in advance for helping us to improve this library! Please read through the template below and answer all relevant questions. Your additional work here is greatly appreciated and will help us respond as quickly as possible.

By submitting an issue to this repository, you agree to the terms within the OpenFGA Code of Conduct.

Describe the problem you'd like to have solved

We currently only support CommonJS, the industry is moving forward in support for ESM modules. We should migrate to ESM Modules but still find a way to support CommonJS for those who haven't migrated yet

Additional context

https://nodejs.org/api/esm.html https://hacks.mozilla.org/2018/03/es-modules-a-cartoon-deep-dive/ https://jestjs.io/docs/ecmascript-modules https://the-guild.dev/blog/support-nodejs-esm https://blog.logrocket.com/publishing-node-modules-typescript-es-modules/

rhamzeh avatar Jul 17 '24 12:07 rhamzeh

Interested. My platform is only using ESM.

guillempuche avatar Jan 31 '25 21:01 guillempuche

tsdown you can support both using this.

productdevbook avatar Jul 18 '25 15:07 productdevbook