Skip to content

Commit cdab32b

Browse files
committed
refactor(cli-with-sentry): make @sentry/node external dependency
Change esbuild config to treat @sentry/node as external rather than bundling it. This allows the dependency to be resolved from node_modules at runtime, reducing bundle size and improving maintainability.
1 parent 82da41e commit cdab32b

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

packages/cli-with-sentry/.config/esbuild.cli-sentry.build.mjs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,8 @@ const config = {
2727
'process.env.INLINED_SOCKET_CLI_SENTRY_BUILD': JSON.stringify('1'),
2828
},
2929

30-
// Include @sentry/node in the bundle (don't externalize it).
31-
external: baseConfig.external?.filter(
32-
ext => !ext.startsWith('@sentry') && ext !== '@sentry/node',
33-
),
30+
// Make @sentry/node external (not bundled).
31+
external: [...(baseConfig.external || []), '@sentry/node'],
3432
}
3533

3634
// Run build if invoked directly.

0 commit comments

Comments
 (0)