How to recompile JavaScript code targeting the browser to target non-browser environments? #22235
-
I've been working on a fork of https://github.com/diffusion-studio/vits-web for a few days now. The relevant JavaScript code I don't have the source code. In Can Emscripten accept code output by Emscripten and recompile to a non-browser target to remove occurrences of |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 7 replies
-
There is no way to re-compile the JS code no. However we have a way to take the wasm file and generate new JS for it. Is not very widely used so it might have some issues, but you can do |
Beta Was this translation helpful? Give feedback.
If you are targetting JS engines then I highly recommend using the emscripten-generated loader code. Trying to write the loader code yourself can be a big project, depending on which APIs your module depends on.