Skip to content

Consider shipping wasm files to npm #58

Description

@TzviPM

I'm trying to use hash-wasm's argon2 implementation with Vercel's Edge runtime and running into an compilation error. It seems hash-wasm's dist files include a hard-coded string of the wasm base64-encoded and then run through WebAssembly.compile. Dynamic code evaluation isn't supported in that runtime (https://nextjs.org/docs/messages/edge-dynamic-code-evaluation).

Wasm files can be imported differently and handled by nextjs during bundling (ex. import someWasm from './some.wasm?module') but the wasm outputs from hash-wasm don't seem to be shipped as independant artifacts with the library code.

I imagine having access to the wasm files could be useful for other situations as well.

Would you be open to a PR to add this?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions