You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Emscripten provides a Module.locateFile which can be specified in the Module.
If set, this method will be called when the runtime needs to load a file, such as a .wasm WebAssembly file, .mem memory init file, or a file generated by the file packager. The function receives the relative path to the file as configured in build process and a prefix (path to the main JavaScript file’s directory), and should return the actual URL. This lets you host file packages or the .mem file etc. on a different location than the directory of the JavaScript file (which is the default expectation), for example if you want to host them on a CDN.
The current implementation of loading the files uses the current path or the web current location where it is served from.
Supporting the locateFile on the Module as specified in the link above will introduce more flexibility into the loading. This specifically becomes more important when loading the runtime through Node.js and Electron where the files are normally read from a disk medium.
The text was updated successfully, but these errors were encountered:
kjpou1
added a commit
to kjpou1/mono
that referenced
this issue
Oct 11, 2018
* [wasm] Fix the build.
* [wasm] Add --copy parameter to packager
- copy parameter
```
--copy=always|ifnewer Set the type of copy to perform
'always' overwrites the file if it exists.
'ifnew' copies or overwrites the file if modified or size is different.
```
- Fix wasm build target in do-runtime target.
* [wasm] Add support for Module.locateFile to runtime loading
See issue #11099 for more information.
resolves issue: #11099
* Fix spelling of option `ifnew` to `ifnewer`
Emscripten provides a Module.locateFile which can be specified in the Module.
The current implementation of loading the files uses the current path or the web current location where it is served from.
Supporting the
locateFile
on the Module as specified in the link above will introduce more flexibility into the loading. This specifically becomes more important when loading the runtime through Node.js and Electron where the files are normally read from a disk medium.The text was updated successfully, but these errors were encountered: