emscripten-core/emscripten
在 GitHub 查看Data files are loaded from root, not from directory where js file is loaded from
Open
#12,288 创建于 2020年9月20日
good first bughelp wanted
仓库指标
- Star
- (27,361 star)
- PR 合并指标
- (平均合并 19天 10小时) (30 天内合并 147 个 PR)
描述
I have a modularized wasm module that pre-js's file_packager-produced package:
/index.html (that loads dist/module.js)
/dist/module.js
/dist/module.wasm
/dist/module.data
module.wasm is indeed requested as /dist/module.wasm, but module.data is requested as /module.data, contrary to docs:
Changing the data file location
By default, the .data file containing all the preloaded files is loaded from the same URL as your .js file.
Explicit locateFile(package_name) {return '/dist/' + package_name} helped, but it would be nice if it was not needed