feat(astro): Align options with shared build time options type#17396
feat(astro): Align options with shared build time options type#17396
Conversation
size-limit report 📦
|
| // todo(v11): Extract `release` build time option here - cannot be done currently, because it conflicts with the `DeprecatedRuntimeOptions` type | ||
| // release, | ||
| bundleSizeOptimizations, | ||
| unstable_sentryVitePluginOptions, |
There was a problem hiding this comment.
Bug: Sentry Vite Plugin Misinterprets Configuration Options
New top-level build-time options (e.g., org, project, authToken, sentryUrl, headers, telemetry, silent, errorHandler) are not destructured from the options object. This causes them to be incorrectly included in otherOptions, triggering a deprecation warning for 'additional options'. As a result, misleading warnings appear in production builds, despite these options being valid and used for Sentry Vite plugin configuration.
| * @deprecated This option was deprecated. Please move the options to the top-level configuration. | ||
| * See the migration guide in the SourceMapsOptions type documentation. | ||
| */ | ||
| bundleSizeOptimizations?: BundleSizeOptimizationOptions; |
There was a problem hiding this comment.
Am I confused or did this disappear with the changes? 🤔
There was a problem hiding this comment.
This is part of the shared type so it's possible to delete it here :)
closes #18946 closes [JS-1536](https://linear.app/getsentry/issue/JS-1536/contradicting-warnings-between-sentryastro-and-sentry-vite-plugin) This is a follow up PR for #17396 I also changed the name to `doNotUseTheseOptions` to kinda prevent this in the future
|
I am super confused and try to understand the "correct way" to define a release name in Astro at the moment. I stumbled across this PR, maybe you can help here @s1gr1d ? In the docs it says I should set it as |
|
@JuJup 👋 In case that doesn't work for you, you can create a new issue with a small reproduction (I suggest using |
As Astro currently mixes build-time and runtime options, the
releaseoption was omitted from the type. It's only possible to set this option with theunstable_sentryVitePluginOptions:(Closes #17067