Skip to content

fix(nextjs): widen project option type to string | string[]#21067

Open
delorge wants to merge 1 commit into
getsentry:developfrom
delorge:fix/nextjs-project-option-type
Open

fix(nextjs): widen project option type to string | string[]#21067
delorge wants to merge 1 commit into
getsentry:developfrom
delorge:fix/nextjs-project-option-type

Conversation

@delorge
Copy link
Copy Markdown

@delorge delorge commented May 20, 2026

@sentry/bundler-plugin-core accepts string | string[] for project but SentryBuildOptions narrowed it to string, causing a TS error when users passed an array even though the value is forwarded verbatim.

Before submitting a pull request, please take a look at our
Contributing guidelines and verify:

  • If you've added code that should be tested, please add tests.
  • Ensure your code lints and the test suite passes (yarn lint) & (yarn test).
  • Link an issue if there is one related to your pull request. If no issue is linked, one will be auto-generated and linked.

Closes #21066

`@sentry/bundler-plugin-core` accepts `string | string[]` for `project`
but `SentryBuildOptions` narrowed it to `string`, causing a TS error
when users passed an array even though the value is forwarded verbatim.

Co-Authored-By: claude-sonnet-4-6 <noreply@anthropic.com>
Copy link
Copy Markdown
Member

@nicohrubec nicohrubec left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the fix looks good to me. we actually seem to have this problem in other frameworks as well, thanks for the contribution!

@nicohrubec nicohrubec self-assigned this May 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[@sentry/nextjs]: project option in withSentryConfig typed as string but bundler plugin accepts `string | string[]

2 participants