Skip to content

Deleting existing package.json when --no-pack is passed #1521

@Enduriel

Description

@Enduriel

🐛 Bug description

When passing --no-pack to wasm-pack, if an existing package.json is present in the out-dir, it will get deleted

🤔 Expected Behavior

The existing package.json should be left alone, a new one should just not be generated.

👟 Steps to reproduce

Place package.json in /pkg
Run wasm-pack build --no-pack

🌍 Your environment

Include the relevant details of your environment.
wasm-pack version: 0.13.1
rustc version: 1.91.0-nightly (3672a55b7 2025-08-13)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions