-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unclear how to make Sentry work with Vite + React sourcemaps #546
Comments
|
I run |
so you are using the vite plugin and the cli to upload sourcemaps? I recommend removing one or the other. |
Yep, that was it, many thanks!!! Messed up a bit! |
Environment
Vite 5.2.0, React 18.2, Node 20.11.0
What version are you running? Etc.
@sentry/react: 8.7.0
@sentry/vite-plugin: 2.18.0
Steps to Reproduce
Kept Sentry init options default
vite preview
so my prod bundle runsExpected Result
After firing error I expected to see normal stack trace with my code like this, like I see in browser:
Actual Result
But actually I'm getting weird stacktrace like this:
And this on Most Relevant tab
So where I got first screenshot?
If it configure VIte
sourcemap: 'inline'
I'm getting sourcemap baked into bundle so bundle file weights 11Mb+ but it allows Sentry to show me actual code.So how to configure Vite and/or Sentry to get nice stacktraces without making weird 11Mb bundles with baked in sourcemaps?
If no clear idea comes to mind, maybe there is some repo in github where VIte + Sentry is configured nice way, so I can compare and try
The text was updated successfully, but these errors were encountered: