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
I think it would be useful to have a way to include additional arbitrary fields in the generated package.json. For example, in my use case, we use GitHub packages to serve our internal packages, so we need to set the publishConfig manually on the generated manifest to be able to publish to GitHub. I know we can also use an .npmrc file, but, to me, the issue is the same: the source of truth should be defined in the base code, juste like repository or author values.
Also, scope of the package could be defined in these fields, so it can be kept in source control rather than a flag passed on the command line (command line flag could still be available, but would overwrite value if present, for example).
I don't know if it makes sense to you, but we could add a new section in Cargo.toml (e.g. [package.wasm-pack.extra]) that the build step would use and then output in the package.json.
Maybe scope would be best located under [package] though, closer to the actual package name.
I'm still learning Rust, but if you guys are interested, I could make a PR to implement this feature.
Thanks!
The text was updated successfully, but these errors were encountered:
馃挕 Feature description
I think it would be useful to have a way to include additional arbitrary fields in the generated package.json. For example, in my use case, we use GitHub packages to serve our internal packages, so we need to set the
publishConfig
manually on the generated manifest to be able to publish to GitHub. I know we can also use an .npmrc file, but, to me, the issue is the same: the source of truth should be defined in the base code, juste like repository or author values.Also, scope of the package could be defined in these fields, so it can be kept in source control rather than a flag passed on the command line (command line flag could still be available, but would overwrite value if present, for example).
I don't know if it makes sense to you, but we could add a new section in Cargo.toml (e.g.
[package.wasm-pack.extra]
) that the build step would use and then output in the package.json.Maybe scope would be best located under
[package]
though, closer to the actual package name.I'm still learning Rust, but if you guys are interested, I could make a PR to implement this feature.
Thanks!
The text was updated successfully, but these errors were encountered: