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
From what I can find in the docs, the only way to set the package scope when building is via the CLI flag. This could be error prone in a repo as any script that calls build for different reasons needs to specify the scope and not mess it up.
This is contrasted by the package name being read from Cargo.toml. Scope is effectively part of the package name in npm. I don't think I've ever seen publishing the same package under multiple scopes unless the organization changed their name/scope and the old one is marked as deprecated. To me, it doesn't make sense that scope would not be part of Cargo.toml just like name is.
💻 Basic example
Something like this should produce a package.json with @my-scope/my-package as the package name when running wasm-pack build without the --scope flag. I have little experience in Rust config, so no idea if package is the right section here
[package]
name = "my-package"scope = "my-scope"
The text was updated successfully, but these errors were encountered:
💡 Feature description
From what I can find in the docs, the only way to set the package scope when building is via the CLI flag. This could be error prone in a repo as any script that calls build for different reasons needs to specify the scope and not mess it up.
This is contrasted by the package name being read from
Cargo.toml
. Scope is effectively part of the package name in npm. I don't think I've ever seen publishing the same package under multiple scopes unless the organization changed their name/scope and the old one is marked as deprecated. To me, it doesn't make sense that scope would not be part ofCargo.toml
just likename
is.💻 Basic example
Something like this should produce a
package.json
with@my-scope/my-package
as the package name when runningwasm-pack build
without the--scope
flag. I have little experience in Rust config, so no idea ifpackage
is the right section hereThe text was updated successfully, but these errors were encountered: