-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Description
Is there an existing issue for this?
- I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues
- I have reviewed the documentation https://docs.sentry.io/
- I am using the latest SDK release https://github.com/getsentry/sentry-javascript/releases
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using?
@sentry/nuxt
SDK Version
10.42.0
Framework Version
Nuxt 4.3.1
Link to Sentry event
No response
Reproduction Example/SDK Setup
No response
Steps to Reproduce
- Create a Nuxt 4 app on Vite 7.
- Add
@sentry/nuxt/module. - Configure Sentry for a production build with:
orgprojectauthTokenrelease.name- browser sourcemaps enabled
- Run a production build.
- Trigger a client-side/browser error.
- Check the built client chunks and the resulting Sentry event.
Expected Result
For client builds, Sentry should:
- run the Vite plugin during the browser build
- inject
SENTRY_RELEASE - inject debug IDs (
sentry-dbid-*) - upload/link client sourcemaps correctly
- show a non-null release on browser events
- symbolicate browser stack traces
Actual Result
Server-side sourcemaps work, but client-side sourcemaps do not.
For browser errors:
- events arrive without a linked release / release is effectively missing for the browser event path
- stack traces remain minified
- built client chunks do not contain
SENTRY_RELEASE - built client chunks do not contain
sentry-dbid-*markers
Additional Context
After debugging this in depth, the problem appears to be how @sentry/nuxt registers @sentry/vite-plugin for the client build.
The current Nuxt integration path adds sentryVitePlugin(...) from a Vite config() hook. On Vite 7, plugins pushed there are ignored because plugin resolution has already happened, so the plugin never actually participates in the client build.
That means the client-side Vite plugin hooks such as renderChunk() / writeBundle() do not run, which explains why:
- no
SENTRY_RELEASEbanner is injected - no debug IDs are injected
- no client sourcemaps are linked correctly
- browser events remain unsymbolicated
This also explains why server-side sourcemaps still work: the server path is handled separately through Nitro/Rollup and is unaffected.
I was able to confirm the root cause with a workaround:
- registering
sentryVitePlugin(...)directly via Nuxt’saddVitePlugin(...)fordev: falseandserver: falseimmediately fixed the problem - after doing that, client bundles contained release/debug ID markers and new browser issues were symbolicated correctly
So this looks like a compatibility issue between @sentry/nuxt and Vite 7’s plugin lifecycle, specifically for the client build path.
Priority
React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it.
Metadata
Metadata
Assignees
Fields
Give feedbackProjects
Status