-
Notifications
You must be signed in to change notification settings - Fork 472
Closed
Labels
Milestone
Description
Specified upstream RFC 8 is a way for NPM dependencies to work transitively throughout the crate graph. The first phase of supporting this is now implemented in wasm-bindgen and the next phase is in wasm-pack itself. Thankfully it shouldn't be too hard!
Currently today wasm-pack will write out a package.json, but this will overwrite a package.json created by wasm-bindgen, if one exists. Instead what wasm-pack should do is:
- When creating
package.json, first check to see if one already exists at the target location - Deserialize the
dependenciesmap, if it exists, otherwise start with an empty object - Add in all the current configuration (name, scope, urls, etc)
- Write out the
package.jsonagain, overwriting what was previously there.
Basically the package.json that wasm-pack writes should just be merged with the package.json emitted by wasm-bindgen if it's already there.