esm-potrace-wasm
esm-potrace-wasm copied to clipboard
Try to improve the build
Fixes #2 (eventually… 🙄)
Uncertain what the issue is, but this is what I see when running this branch locally:
Uncaught (in promise) TypeError: svg.replaceAll is not a function
The return value is a number, likely the memory reference of the string generated in WASM. I'd look further but I see there's a lot of new code in main so it's not so simple to determine what isn't really working for you. If you rebaseline this branch and say more about the problem I'm happy to lend a hand.
FWIW, the changes in this PR seem correct to me. I'd expect it to work.
also a little confused why when building from master and running the demo, I don't see any WASM in the network panel. then I saw it was inlined in the JS as a data url 👀
@connorjclark I have opened a new PR: https://github.com/tomayac/esm-potrace-wasm/pull/7. Leaving this one open for comparison.