naptha / tesseract.js

Pure Javascript OCR for more than 100 Languages 📖🎉🖥
http://tesseract.projectnaptha.com/
Apache License 2.0
34.91k stars 2.21k forks source link

Switch from CommonJS to ESM modules #890

Open Balearica opened 7 months ago

Balearica commented 7 months ago

This would be one way of fixing #876, and should probably happen eventually regardless.

laurent22 commented 7 months ago

Please don't switch to ESM or keep the CommonJS release too. Many projects cannot easily switch to ESM and TesseractJS is unique enough that it won't be possible to find an alternative for non-ESM projects.

Balearica commented 3 months ago

I've removed the v6 milestone. My understanding is that the Node.js ecosystem will transition to ESM eventually, however I don't think we need to be on the bleeding edge of this, and most Node.js projects are still using CJS. Looking at node-fetch (the reason this came up), just 5 million of the 43 million weekly downloads (12%) are from the ESM versions.

laurent22 commented 3 months ago

Thank you for taking the time to investigate this.