File tree Expand file tree Collapse file tree 2 files changed +3
-5
lines changed
dev-packages/rollup-utils Expand file tree Collapse file tree 2 files changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,6 @@ import {
19
19
makeImportMetaUrlReplacePlugin ,
20
20
makeNodeResolvePlugin ,
21
21
makeRrwebBuildPlugin ,
22
- makeSetSDKSourcePlugin ,
23
22
makeSucrasePlugin ,
24
23
} from './plugins/index.mjs' ;
25
24
import { makePackageNodeEsm } from './plugins/make-esm-plugin.mjs' ;
@@ -45,7 +44,6 @@ export function makeBaseNPMConfig(options = {}) {
45
44
const importMetaUrlReplacePlugin = makeImportMetaUrlReplacePlugin ( ) ;
46
45
const cleanupPlugin = makeCleanupPlugin ( ) ;
47
46
const extractPolyfillsPlugin = makeExtractPolyfillsPlugin ( ) ;
48
- const setSdkSourcePlugin = makeSetSDKSourcePlugin ( 'npm' ) ;
49
47
const rrwebBuildPlugin = makeRrwebBuildPlugin ( {
50
48
excludeShadowDom : undefined ,
51
49
excludeIframe : undefined ,
@@ -106,7 +104,6 @@ export function makeBaseNPMConfig(options = {}) {
106
104
107
105
plugins : [
108
106
nodeResolvePlugin ,
109
- setSdkSourcePlugin ,
110
107
sucrasePlugin ,
111
108
debugBuildStatementReplacePlugin ,
112
109
importMetaUrlReplacePlugin ,
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
+
18
20
export type SdkSource = 'npm' | 'cdn' | 'loader' ;
19
21
20
22
/**
@@ -30,6 +32,5 @@ export function isBrowserBundle(): boolean {
30
32
* Get source of SDK.
31
33
*/
32
34
export function getSDKSource ( ) : SdkSource {
33
- // @ts -expect-error __SENTRY_SDK_SOURCE__ is injected by rollup during build process
34
- return __SENTRY_SDK_SOURCE__ ;
35
+ return typeof __SENTRY_SDK_SOURCE__ !== 'undefined' ? __SENTRY_SDK_SOURCE__ : 'npm' ;
35
36
}
You can’t perform that action at this time.
0 commit comments