-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
How can I load compiled files from a subfolder? #6164
Comments
You can define a custom function in the Module.locateFile = function(url) { return 'wasm/'+url; }; Currently the semantics are to treat relative URLs to be processed relative to the document's baseURI (the location of the |
Check out this recent emscripten-discuss thread: https://groups.google.com/d/msg/emscripten-discuss/C7-i1gqWay4/x2sSl2qmBQAJ |
Yeah, and I see we already have docs on the wiki. |
i attempted to use your solution, however, even though the emscripten module is picking up window.Module = {
locateFile: url => {
console.log("LOCATE", url)
debugger
return `./path/${url}`
}
} the emscripten module is looking for i can see in the debugger that emscripten is initially picking up my Module definition here, but i don't know why it's not being called |
How can I load compiled files from a subfolder?
I want to create a project with such file architecture:
I'm using that emcc command syntax:
I'm loading example.js file by that markup:
Finally, the console is showing me that error:
I did some research, but I didn't find any way to solve that problem.
Keeping all files in the root directory isn't good idea :/
The text was updated successfully, but these errors were encountered: