File tree 2 files changed +4
-4
lines changed
dev-packages/rollup-utils/plugins
2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -63,8 +63,9 @@ export function makeIsDebugBuildPlugin(includeDebugging) {
63
63
export function makeSetSDKSourcePlugin ( sdkSource ) {
64
64
return replace ( {
65
65
preventAssignment : false ,
66
+ delimiters : [ '' , '' ] ,
66
67
values : {
67
- __SENTRY_SDK_SOURCE__ : JSON . stringify ( sdkSource ) ,
68
+ "/* ref: __SENTRY_SDK_SOURCE__ */" : `return ${ JSON . stringify ( sdkSource ) } ;` ,
68
69
} ,
69
70
} ) ;
70
71
}
Original file line number Diff line number Diff line change 15
15
16
16
declare const __SENTRY_BROWSER_BUNDLE__ : boolean | undefined ;
17
17
18
- declare const __SENTRY_SDK_SOURCE__ : SdkSource | undefined ;
19
-
20
18
export type SdkSource = 'npm' | 'cdn' | 'loader' ;
21
19
22
20
/**
@@ -32,5 +30,6 @@ export function isBrowserBundle(): boolean {
32
30
* Get source of SDK.
33
31
*/
34
32
export function getSDKSource ( ) : SdkSource {
35
- return typeof __SENTRY_SDK_SOURCE__ !== 'undefined' ? __SENTRY_SDK_SOURCE__ : 'npm' ;
33
+ // This comment is used to identify this line in the CDN bundle build step and replace this with "return 'cdn';"
34
+ /* ref:__SENTRY_SDK_SOURCE__ */ return 'npm' ;
36
35
}
You can’t perform that action at this time.
0 commit comments