sindresorhus / file-type

Detect the file type of a file, stream, or data
MIT License
3.64k stars 345 forks source link

CommonJS / Hybrid Package #627

Closed arietrouw closed 7 months ago

arietrouw commented 7 months ago

It looks like you guys switched to a pure ESM package around version 17 or so. Why not make a hybrid package that generates both?

Reason: I am produce my own hybrid package and want to use your package, but for people using my package from CommonJS, loading your package fails, which makes me either have to lock your package at an old version or seek an alternative package.

Thoufghts?

sindresorhus commented 7 months ago

No plans to do that. Hybrid packages have a lot of downsides too. See: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c?permalink_comment_id=3850849#gistcomment-3850849