wasm-pack icon indicating copy to clipboard operation
wasm-pack copied to clipboard

__dirname is not sufficient to derive the path to WASM file

Open mPaella opened this issue 2 years ago • 2 comments

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

mPaella avatar May 09 '23 03:05 mPaella

Thanks for reporting. Feel free to send a PR that makes it work with next.js app directory.

drager avatar May 14 '23 10:05 drager

This is an issue with wasm-bindgen, not wasm-pack. The JS glue-code generation happens there

ranile avatar May 30 '23 14:05 ranile