Skip to content

Allow the user to fully customize the package name #427

Closed
@stristr

Description

@stristr

💡 Feature description

Currently, the NPM package name generated by wasm-pack is the (optionally scoped) name of the Rust crate being packed. There is utility in being able to choose the name of the package; for example, I might want to publish multiple packages to the NPM repository using different --target options.

💻 Basic example

I propose a command line flag, --package-name, for this purpose, which should work in conjunction with --scope.

For example:

wasm-pack build examples/js-hello-world --scope test --package-name custom-name

should result in an NPM package named @test/custom-name.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions