-
Notifications
You must be signed in to change notification settings - Fork 421
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
documenting usage of worldview with webpack #670
Comments
closing because no further action is expected or requested from the devs |
Hi @soumith,
They seem to be related to using node modules like 'fs' and 'path' that are not applicable in browser environment. I modified my
I have no clue how to continue. Do you have any suggestions? |
Ok I'm able to solve all the problems. Thanks for providing the hardest part of the solution. I totally agree with you on the necessity to document the usage of webpack! I shared mine in #699 |
worldview has a dependency on draco3d, which has a wasm module for it's decoder.
webpack is one of the most common asset bundler in the javascript / frontend-development world.
Webpack out of the box doesn't support emscripten-compiled
wasm
files.The most popular React development tool Create React App also uses Webpack.
Using worldview inside any app that uses webpack fails most commonly with the following error while loading draco3d:
After several hours of understanding how create-react-app's build works, and then how webpack works and interacts with wasm files, and finding the relevant webpack issue: webpack/webpack#7352
I ended up adding this to my
webpack.config.js
in therules
sectionHope this helps the next person who is going to run into this.
The text was updated successfully, but these errors were encountered: