I am using this package in a ES Module context.
When I load my project in the browser I get the follow error:
Uncaught ReferenceError: __dirname is not defined
The message is pretty obvious. First __dirname doesn't exist in es module context. Second, I think it would be better to make your package es-module compliant. Removing require replacing with import statements and trying to remove the use of path library which is not loadable in browsers.