Open mvniekerk opened 4 years ago
Still no TextDecoder/ TextEncoder classes inherently included in RN.
Yeah, installing 3rd-party modules is apparently the best solution to overcome these issues
Still the same, why it's so? Addition libraries not working as expected (
🐛 Bug description
React Native does not have the NodeJs "util" module, thus can't get to the TextDecoder class. Whenever the main js file is loaded, Metro server stops because it does not have the "util" class. Installing "util" causes a cascading import of other (not-provided-for) NodeJs libs.
Possible workaround
Best is to install the "text-encoding' module. In the main .js file change it to require from "text-encoding" instead of "util" as "text-encoding" provides the TextDecoder class.
🤔 Expected Behavior
To load the TextDecoder class on React Native
👟 Steps to reproduce
🌍 Your environment
wasm-pack version: 0.9.1 rustc version: 1.42-beta.2