I have a javascript file that calls a wasm file, when I register the javascritpt somewhere in the script, it fetch the file from the wrong location. What's the best practice to solve this problem?
Here is what's going on:
$this->registerJsFile('@web/folder/file.js', ['position' => \app\components\View::POS_END]);
it suppose to get the wasm file from /folder/ but instead it grabbing it from /folder2/folder3/wasmfile.wasm
Looks like you forgot to convert common alias
@web
into a string. It is not done automatically inregisterJsFile
.It is a known problem, you can see one rejected pull request here.