esm-potrace-wasm
esm-potrace-wasm copied to clipboard
Improve the build
Currently the build is very hacky, now @Surma pointed at the EXPORT_ES6 option.
Turns out this also is the reason for #3.
I am using this module in a browser based algorithm. Now I'd like to port this to a ESM node.js version, but I get the following error ReferenceError: __dirname is not defined in ES module scope. If I remove __dirname from the minified code it works, but this seems to be an overly hacky solution. Any way how to get this fixed with a better build?
I have tried my luck in https://github.com/tomayac/esm-potrace-wasm/pull/1, but haven’t succeeded unfortunately. Definitely help wanted.