-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue loading the .riv file when configured using webpack. #298
Comments
@zplata Can you help with this? I'm kinda stuck here.. |
Hi @vigsub - The error comes from Emscripten which does the binding of underlying C++ code to JS. In this case, there's an underlying function that thinks it's taking in an enum and you're passing string values in your Layout options. You'll want to import
|
@vigsub wonder if this helped solve your issue? |
Oops. Sorry.. Missed this thread. Will check this and respond. Thanks :) |
Nope.. Not working :( .. If providing Fit.Cover and Alignment is a problem, in the second example mentioned, I don't use them. Still it's not rendering. @zplata I suppose this has something to do with the loaders in webpack?? Please assist.. |
@vigsub sorry to hear - I don't imagine it should be an issue with Webpack as you're not trying to import WASM or Rive files in your JS/TS files, but not to say that it couldn't be the issue! In case I'm missing context here, do you have a repro project that you can post here so that we can debug further and run in isolation? |
I'm using webpack 5 for bundling and trying to load a rive file into my React app. I'm getting the following error.
These are the rules in the webpack config file.
As suggested in one of the resolved issues in this repo, I'm using the following approach.
Also tried multiple ways of loading the rive component.
P.S: It is working fine in any sample app created with create-react-app. But in the app where I use webpack to manually configure, it's not working as expected and throws the binding error message. What are the loaders I'm missing? Or is it something else that I'm missing?
The text was updated successfully, but these errors were encountered: