mmmagic
mmmagic copied to clipboard
Compatibility with esm
The line: https://github.com/mscdex/mmmagic/blob/master/lib/index.js#L2 produces:
ReferenceError: __dirname is not defined
There is a discussion for webpack, but it would be great, if esm could be supported by this great library.
BTW, if I understand correctly, it uses a very old version of libmagic. Maybe it could be updated.