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
It's not unusual to have wasm-pack packages exported with different names,
and since this is not yet supported by wasm-pack people have been using sed to replace the "name" field in package.json (rustwasm/wasm-pack#427).
This plugin does not seem to work when the imported package name fails to match the package files.
I tried to open a pull request but I'm new to rollup/vite plugin and I don't want to waste the next 5 months trying to reimplement classic-js resolution algorithm, so I'll leave this issue if anyone wants to work into it.
As a workaround you can use this in your wasm-pack Makefile to rename "my_module_wasm" into "my_module":
sed -i -e 's/my\([-_]\)module[-_]wasm/my\1module/g' pkg/package.json pkg/my_module_wasm.js
forfin pkg/my_module_wasm*;do mv "$$f"$$(echo "$$f"| sed 's/my_module_wasm/my_module/g');done
The double $$ are required to escape bash variables from make.
The text was updated successfully, but these errors were encountered:
It's not unusual to have wasm-pack packages exported with different names,
and since this is not yet supported by wasm-pack people have been using sed to replace the "name" field in
package.json
(rustwasm/wasm-pack#427).This plugin does not seem to work when the imported package name fails to match the package files.
I tried to open a pull request but I'm new to rollup/vite plugin and I don't want to waste the next 5 months trying to reimplement classic-js resolution algorithm, so I'll leave this issue if anyone wants to work into it.
As a workaround you can use this in your wasm-pack Makefile to rename "my_module_wasm" into "my_module":
The double
$$
are required to escape bash variables from make.The text was updated successfully, but these errors were encountered: