Skip to content

Commit ba2aec7

Browse files
committed
fix(e2e): Add development condition to Vite resolve config
Vite needs to resolve SDK packages with 'development' condition to use builds that include Spotlight integration code (stripped in production).
1 parent 1f9d438 commit ba2aec7

File tree

1 file changed

+8
-0
lines changed
  • dev-packages/e2e-tests/test-applications/browser-spotlight

1 file changed

+8
-0
lines changed

dev-packages/e2e-tests/test-applications/browser-spotlight/vite.config.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,14 @@ export default defineConfig({
1111
preview: {
1212
port: 3030,
1313
},
14+
resolve: {
15+
// Use 'development' condition to resolve SDK packages to their dev builds
16+
// This is necessary because Spotlight integration code is stripped from production builds
17+
// The @sentry/browser package exports different builds via conditional exports:
18+
// - production (default): Spotlight code stripped
19+
// - development: Spotlight code included
20+
conditions: ['development'],
21+
},
1422
define: {
1523
// Define env vars for the E2E test
1624
// VITE_SENTRY_SPOTLIGHT is read automatically by @sentry/react via import.meta.env

0 commit comments

Comments
 (0)