Skip to content

feat: opt-out from package.json generation for dist-hydrate-script output target #6570

@alexischarp

Description

@alexischarp

Prerequisites

Describe the Feature Request

Add a config option to disable generating hydrate/package.json for the dist-hydrate-script output target.

Describe the Use Case

In monorepos, the generated hydrate/package.json creates an extra package entry that changes lockfiles.

Moreover the current name given to the package is incorrect (e.g. @org/web-components/hydrate).

Finally, some consumers may not need a separate hydrate package because they would publish part of the main package.

Describe Preferred Solution

Introduce a boolean option (e.g. generatePackageJson or similar) to skip writing hydrate/package.json. Default remains current behavior to avoid breaking changes.

Describe Alternatives

No response

Related Code

No response

Additional Information

There was previous discussion about removing it, but it’s currently kept for compatibility. This opt‑out would allow users to avoid the file now and remove it fully in a future major.

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