-
Notifications
You must be signed in to change notification settings - Fork 51
Description
Description
After upgrading from @sentry/vite-plugin 4.6.1 to 4.6.2, the main entry chunk no longer receives Debug ID injection, while all other chunks (lazy-loaded, vendor splits, etc.) are injected correctly.
This causes the warning:
[sentry-vite-plugin] Debug: Could not determine debug ID from bundle. This can happen if you did not clean your output folder before installing the Sentry plugin. File will not be source mapped: /path/to/dist/assets/index-XXXXX.js
Environment
- @sentry/vite-plugin: 4.6.2 (broken), 4.6.1 (works)
- vite: 5.4.x
- Node: 22.x
- OS: Linux (Docker) / macOS
Steps to Reproduce
- Create a Vite React project with @sentry/[email protected]
- Configure the plugin with debug: true
- Run production build
- Observe that all chunks except the main entry receive Debug IDs
Expected Result
All chunks, including the main entry bundle, should have the Debug ID snippet injected:
e._sentryDebugIds = e._sentryDebugIds || {}; e._sentryDebugIds[n] = "UUID"; e._sentryDebugIdIdentifier = "sentry-dbid-UUID";
Actual Result
- ✅ All lazy-loaded chunks have Debug IDs
- ✅ All vendor/split chunks have Debug IDs
- ❌ Main entry chunk (index-*.js) has no Debug ID injection
The main entry only contains the Sentry SDK code that reads Debug IDs, but not the injected assignment.
Plugin Configuration
sentryVitePlugin({ org: 'my-org', project: 'my-project', release: { name: process.env.BUILD_ID }, authToken: process.env.SENTRY_AUTH_TOKEN, telemetry: false, debug: true, sourcemaps: { filesToDeleteAfterUpload: ['./dist/**/*.map'], }, });
Metadata
Metadata
Assignees
Labels
Projects
Status