@@ -3,7 +3,7 @@ import * as path from 'path';
33import { sentryVitePlugin } from '@sentry/vite-plugin' ;
44import type { AstroConfig , AstroIntegration } from 'astro' ;
55
6- import { consoleSandbox , dropUndefinedKeys } from '@sentry/core' ;
6+ import { consoleSandbox } from '@sentry/core' ;
77import { buildClientSnippet , buildSdkInitFileImportSnippet , buildServerSnippet } from './snippets' ;
88import type { SentryOptions } from './types' ;
99
@@ -62,34 +62,32 @@ export const sentryAstro = (options: SentryOptions = {}): AstroIntegration => {
6262 sourcemap : computedSourceMapSettings . updatedSourceMapSetting ,
6363 } ,
6464 plugins : [
65- sentryVitePlugin (
66- dropUndefinedKeys ( {
67- org : uploadOptions . org ?? env . SENTRY_ORG ,
68- project : uploadOptions . project ?? env . SENTRY_PROJECT ,
69- authToken : uploadOptions . authToken ?? env . SENTRY_AUTH_TOKEN ,
70- telemetry : uploadOptions . telemetry ?? true ,
71- _metaOptions : {
72- telemetry : {
73- metaFramework : 'astro' ,
74- } ,
65+ sentryVitePlugin ( {
66+ org : uploadOptions . org ?? env . SENTRY_ORG ,
67+ project : uploadOptions . project ?? env . SENTRY_PROJECT ,
68+ authToken : uploadOptions . authToken ?? env . SENTRY_AUTH_TOKEN ,
69+ telemetry : uploadOptions . telemetry ?? true ,
70+ _metaOptions : {
71+ telemetry : {
72+ metaFramework : 'astro' ,
7573 } ,
76- ... unstable_sentryVitePluginOptions ,
77- debug : options . debug ?? false ,
78- sourcemaps : {
79- assets : uploadOptions . assets ?? [ getSourcemapsAssetsGlob ( config ) ] ,
80- filesToDeleteAfterUpload :
81- uploadOptions ?. filesToDeleteAfterUpload ?? updatedFilesToDeleteAfterUpload ,
82- ... unstable_sentryVitePluginOptions ?. sourcemaps ,
83- } ,
84- bundleSizeOptimizations : {
85- ... options . bundleSizeOptimizations ,
86- // TODO: with a future version of the vite plugin (probably 2.22.0) this re-mapping is not needed anymore
87- // ref: https://github.com/getsentry/sentry-javascript-bundler-plugins/pull/582
88- excludePerformanceMonitoring : options . bundleSizeOptimizations ?. excludeTracing ,
89- ... unstable_sentryVitePluginOptions ?. bundleSizeOptimizations ,
90- } ,
91- } ) ,
92- ) ,
74+ } ,
75+ ... unstable_sentryVitePluginOptions ,
76+ debug : options . debug ?? false ,
77+ sourcemaps : {
78+ assets : uploadOptions . assets ?? [ getSourcemapsAssetsGlob ( config ) ] ,
79+ filesToDeleteAfterUpload :
80+ uploadOptions ?. filesToDeleteAfterUpload ?? updatedFilesToDeleteAfterUpload ,
81+ ... unstable_sentryVitePluginOptions ?. sourcemaps ,
82+ } ,
83+ bundleSizeOptimizations : {
84+ ... options . bundleSizeOptimizations ,
85+ // TODO: with a future version of the vite plugin (probably 2.22.0) this re-mapping is not needed anymore
86+ // ref: https://github.com/getsentry/sentry-javascript-bundler-plugins/pull/582
87+ excludePerformanceMonitoring : options . bundleSizeOptimizations ?. excludeTracing ,
88+ ... unstable_sentryVitePluginOptions ?. bundleSizeOptimizations ,
89+ } ,
90+ } ) ,
9391 ] ,
9492 } ,
9593 } ) ;
0 commit comments