Skip to content

Commit 47e5c6c

Browse files
authored
ref(core): Add shared type for build-time options (#17151)
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) ```typescript 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
1 parent b9849a2 commit 47e5c6c

File tree

2 files changed

+434
-0
lines changed

2 files changed

+434
-0
lines changed

0 commit comments

Comments
 (0)