Skip to content

ref(core): Add shared type for build-time options #17151

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 30, 2025

Conversation

s1gr1d
Copy link
Member

@s1gr1d s1gr1d commented Jul 24, 2025

Adds a Sentry-internal base interface for build-time options used in Sentry's meta-framework SDKs (e.g., Next.js, Nuxt, SvelteKit).

SDKs should extend this interface to add framework-specific configurations. To include bundler-specific options, this type can be combined with one of the Unstable[Bundler]PluginOptions types, such as UnstableVitePluginOptions or UnstableWebpackPluginOptions (also added in this PR)

import type { BuildTimeOptionsBase, UnstableVitePluginOptions } from '@sentry/core';
import type { SentryVitePluginOptions } from '@sentry/vite-plugin';

// Example of how a framework SDK would define its build-time options
type MyFrameworkBuildOptions =
  BuildTimeOptionsBase &
  UnstableVitePluginOptions<SentryVitePluginOptions> & {
    // Framework-specific options can be added here
    myFrameworkSpecificOption?: boolean;
  };

I created some interfaces for better high-level organization:

  • SourceMapsOptions
  • ReleaseOptions
  • BundleSizeOptimizationsOptions

Part of #14212

@s1gr1d s1gr1d requested review from mydea, Lms24 and AbhiPrasad July 24, 2025 12:05
Copy link
Member

@chargome chargome left a comment

Choose a reason for hiding this comment

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

Looks good!

@s1gr1d s1gr1d merged commit 47e5c6c into develop Jul 30, 2025
335 of 337 checks passed
@s1gr1d s1gr1d deleted the sig/buildTimeOptionsType branch July 30, 2025 14:39
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.

3 participants