@@ -38,9 +38,6 @@ export function getDefaultIntegrations(_options: Options): Integration[] {
3838 dedupeIntegration ( ) ,
3939 httpContextIntegration ( ) ,
4040 browserSessionIntegration ( ) ,
41- /* development-only */
42- spotlightBrowserIntegration ( ) ,
43- /* end-development-only */
4441 ] ;
4542}
4643
@@ -94,14 +91,25 @@ export function init(options: BrowserOptions = {}): Client | undefined {
9491 const shouldDisableBecauseIsBrowserExtenstion =
9592 ! options . skipBrowserExtensionCheck && checkAndWarnIfIsEmbeddedBrowserExtension ( ) ;
9693
94+ let defaultIntegrations =
95+ options . defaultIntegrations == null ? getDefaultIntegrations ( options ) : options . defaultIntegrations ;
96+
97+ /* rollup-include-development-only */
98+ if ( options . spotlight ) {
99+ if ( ! defaultIntegrations ) {
100+ defaultIntegrations = [ ] ;
101+ }
102+ defaultIntegrations . push ( spotlightBrowserIntegration ( ) ) ;
103+ }
104+ /* end-rollup-include-development-only */
105+
97106 const clientOptions : BrowserClientOptions = {
98107 ...options ,
99108 enabled : shouldDisableBecauseIsBrowserExtenstion ? false : options . enabled ,
100109 stackParser : stackParserFromStackParserOptions ( options . stackParser || defaultStackParser ) ,
101110 integrations : getIntegrationsToSetup ( {
102111 integrations : options . integrations ,
103- defaultIntegrations :
104- options . defaultIntegrations == null ? getDefaultIntegrations ( options ) : options . defaultIntegrations ,
112+ defaultIntegrations,
105113 } ) ,
106114 transport : options . transport || makeFetchTransport ,
107115 } ;
0 commit comments