Skip to content

[@sentry/rollup-plugin] Make rollup an optional peerDependency #910

@wojtekmaj

Description

@wojtekmaj

Problem: @sentry/rollup-plugin defines rollup as mandatory peerDependency. However:

Vite 8 is rolldown-based. @sentry/vite-plugin which depends on @sentry/rollup-plugin realistically works in environments where rollup is missing. So having rollup as a mandatory dependency is not correct.

In Yarn, this results in warnings:

Package @sentry/vite-plugin@npm:5.0.0 is requested to provide rollup by its descendants

@sentry/vite-plugin@npm:5.0.0
└─ @sentry/rollup-plugin@npm:5.0.0 [ea3b4] (via >=3.2.0)

✘ Package @sentry/vite-plugin@npm:5.0.0 does not provide rollup.

Solution: add peerDependenciesMeta and mark rollup as optional.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No fields configured for issues without a type.

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions