Next.js Discord

Discord Forum

Imported package that use WASM and got error

Unanswered
Sun bear posted this in #help-forum
Open in Discord
Sun bearOP
I imported package that uses wasm and called some method from the package and have got an error as on screenshot

5 Replies

Oriental
hi! Yeah I'm not sure much what to do here either, what I did was load the wasm as a script in a custom document and then just referenced it in useEffects as a global variable
if you reference it with an import then webpack will try to mangle it with bundling which is probably not desired
Oriental