Open lyrixx opened 9 months ago
In your case it would make sense if the PPACKAGE_NAME
was relative to the output JS name?
Perhaps we can just use os.path.relpath
to achieve that?
Perhaps we can just use
os.path.relpath
to achieve that?
yes 👍🏼 This is what I did. I rewrite it in my build process and work as expected. See https://lyrixx.github.io/jolitypo-playground/build/php-web.mjs
var REMOTE_PACKAGE_BASE = '/jolitypo-playground/build/php-web.data';
Should I send a PR?
Yes please. Do you think this is the behavior that everybody will want?
I'm quite new to this wasm world ! But I think yes. Everyone want the correct path 😅
Please include the following in your bug report:
I'm using
emscripten/tools/file_packager.py
and I noticed something strange, and I guess it's an errorhttps://github.com/emscripten-core/emscripten/blob/21f25339df9c6aa8c288297de73236e6aaa79582/tools/file_packager.py#L765-L770
As you can see, the var
REMOTE_PACKAGE_BASE
has valuejs_manipulation.escape_for_js_string(remote_package_name)
, which is equals toremote_package_name = os.path.basename(package_name)
If during the packing phase, I want to put the data in a subfolder, let's say
build/php-web.data
with the option--js-output=build/php-web.data.js
, I got the following code:And this looks wrong, because the data are in the
build/
directory.The full command to reproduce: