Skip to content

Commit 8d0f261

Browse files
committed
Improve
1 parent 84ff77d commit 8d0f261

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

dev-packages/rollup-utils/plugins/npmPlugins.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ export function makeDebugBuildStatementReplacePlugin() {
126126
}
127127

128128
export function makeProductionReplacePlugin() {
129-
const pattern = /\/\* development-only \*\/[\s\S]*?\/\* end-development-only \*\//g;
129+
const pattern = /\/\* rollup-include-development-only \*\/[\s\S]*?\/\* end-rollup-include-development-only \*\//g;
130130

131131
function stripDevBlocks(code) {
132132
if (!code) return null;

packages/browser/src/sdk.ts

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ export function getDefaultIntegrations(_options: Options): Integration[] {
3838
dedupeIntegration(),
3939
httpContextIntegration(),
4040
browserSessionIntegration(),
41-
/* development-only */
41+
/* rollup-include-development-only */
4242
spotlightBrowserIntegration(),
43-
/* end-development-only */
43+
/* end-rollup-include-development-only */
4444
];
4545
}
4646

@@ -101,7 +101,14 @@ export function init(options: BrowserOptions = {}): Client | undefined {
101101
integrations: getIntegrationsToSetup({
102102
integrations: options.integrations,
103103
defaultIntegrations:
104-
options.defaultIntegrations == null ? getDefaultIntegrations(options) : options.defaultIntegrations,
104+
options.defaultIntegrations == null
105+
? getDefaultIntegrations(options)
106+
: [
107+
...(options.defaultIntegrations || []),
108+
/* rollup-include-development-only */
109+
spotlightBrowserIntegration(),
110+
/* end-rollup-include-development-only */
111+
],
105112
}),
106113
transport: options.transport || makeFetchTransport,
107114
};

0 commit comments

Comments
 (0)