connor4312 / blake3

BLAKE3 hashing for JavaScript: native Node bindings (where available) and WebAssembly
https://connor4312.github.io/blake3/index.html
MIT License
177 stars 18 forks source link

Browser can't access WASM #51

Open khazaddum opened 1 year ago

khazaddum commented 1 year ago

I'm trying to use blake3 in an Angular project. The instructions in the README file for browser use seem incorrect.

Importing blake3/browser-async fails to find the module. Using the import blake3/browser.mjs compiles but then the browser produces this error:

Security Error: Content at http://localhost:4200/shop may not load or link to file:///path/to/my/project/node_modules/blake3-wasm/esm/wasm/blake3.wasm.

It seems to not be packaging things correctly.