mmmagic icon indicating copy to clipboard operation
mmmagic copied to clipboard

Compatibility with esm

Open Bessonov opened this issue 3 years ago • 0 comments

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.

Bessonov avatar Dec 07 '22 00:12 Bessonov