wasm-pack
wasm-pack copied to clipboard
__dirname is not sufficient to derive the path to WASM file
Please see https://github.com/Emurgo/cardano-serialization-lib/issues/624 for details
__dirname is not sufficient for deriving the path when used with recent versions of nextjs, in certain situations (app directory)(tested with 13.4.1 and latest canary)
This may be something Vercel will fix, but as of today wasm-pack libraries don't work in the new NextJs App directory
Thanks for reporting. Feel free to send a PR that makes it work with next.js app directory.
This is an issue with wasm-bindgen, not wasm-pack. The JS glue-code generation happens there