-
Notifications
You must be signed in to change notification settings - Fork 424
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
wasm-pack build --target bundler not including *_bg.js file in package.json #837
Comments
After testing this out locally, it looks like both |
Corrected files included in package.json for bundler / no target (#837)
I've just hit this, and it makes it really easy to publish packages to NPM that don't work (I've had to re-publish packages twice already because of this, meaning version bumps). The fix is apparently already merged, any chance that this can be released soon? |
@Alxandr I'm just waiting for @ashleygwilliams to add me as an owner on wasm-pack so I can do the publish. |
Hit this as well, already created 2 broken releases on npm 😕 I hate to ping people, but since it's been over a month since the fix already: It would be awesome if this could be released on crates.io, @ashleygwilliams 🙂 |
For anyone coming here from google who wants a temporary solution, my current workaround is something like
Seems to work, but I wouldn't recommend relying on it |
I think @ashleygwilliams is catching up and we'll probably have a new release not far away. Meanwhile, to fix a broken package, I just had to:
|
Another option: Use |
Wait, why was this issue closed? This problem is still present in v0.9.1 (the current version) and bit me as well. I would strongly encourage the maintainers to address this. |
It looks like repos under the rustwasm org are not actively maintained ;-p |
🐛 Bug description
When running
wasm-pack build --target bundler --scope scopename modulename
, there is are both *.js and *_bg.js files generated. the package.json file looks like this{ "name": "@scopename/modulename", "collaborators": [ "arlo <arlo@purcell.live>" ], "version": "0.4.3", "files": [ "modulename_bg.wasm", "modulename.js", "modulename.d.ts" ], "module": "modulename.js", "types": "modulename.d.ts", "sideEffects": false }
🤔 Expected Behavior
I think the
modulename.js
line infiles
should bemodulename_bg.js
, sincemodulename.js
file will be included anyway because of the"module": "modulename.js"
line. I'm not sure about that detail, but when i dowasm-pack pack
, the generated tar ball is missing themodulename_bg.js
file, so my module doesn't work👟 Steps to reproduce
wasm-pack build --target bundler --scope scopename modulename
🌍 Your environment
Include the relevant details of your environment.
wasm-pack version: 0.9.1
rustc version: rustc 1.43.0 (4fb7144ed 2020-04-20)
The text was updated successfully, but these errors were encountered: