h3poteto / megalodon

Fediverse API client library for node.js and browser
https://h3poteto.github.io/megalodon/
MIT License
245 stars 29 forks source link

Feature request: add ESM support #1701

Open mashirozx opened 1 year ago

mashirozx commented 1 year ago

Currently we are using cjs modules, but it's not friendly to some modern tool chains, see.

This lib is currently compiled with tsc, but it can't compile into ESM perfectly, see. It may needs to introduce bundler like Rollup and SWC.

ThatOneCalculator commented 11 months ago

Related: #1923

Setting it to ESModules (see https://github.com/h3poteto/megalodon/pull/1923/commits/b73a654ceebb547afe9c471cd4ed0680cd2761c0) doesn't work properly, a lot of files end up as export {};

ThatOneCalculator commented 11 months ago

Will be closed by #1963