WASM works with turbo but not with webpack
Answered
Mini Rex posted this in #help-forum
Mini RexOP
I'm using rive which internally loads some wasm.
Everything works nicely when doing local development, when switching to webpack however, I get the following error:
Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: object.
I tried the following to no avail:
- Add a webpack rule to load wasm with url-loader
- Add a webpack rule to load wasm with file-loader
- Add the experiments: asyncWebAssembly and syncWebAssembly to webpack config
Everything works nicely when doing local development, when switching to webpack however, I get the following error:
Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: object.
I tried the following to no avail:
- Add a webpack rule to load wasm with url-loader
- Add a webpack rule to load wasm with file-loader
- Add the experiments: asyncWebAssembly and syncWebAssembly to webpack config
Answered by Mini Rex
Alright, no idea why but the
useRive hook works while RiveComponent doesn't.1 Reply
Mini RexOP
Alright, no idea why but the
useRive hook works while RiveComponent doesn't.Answer