Closed sirflyingv closed 5 months ago
build.sourcemap: true
is fine. Do you have any other tools or plugins in your build pipeline? Some of them may generate faulty source maps.
build.sourcemap: true
is fine. Do you have any other tools or plugins in your build pipeline? Some of them may generate faulty source maps.
"scripts": {
"start": "vite",
"build": "tsc && vite build ",
"build_sentry": "tsc && vite build && npm run sentry:sourcemaps",
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
"preview": "vite preview",
"sentry:sourcemaps": "sentry-cli sourcemaps inject --org ng-hp --project my-project-front ./build && sentry-cli sourcemaps upload --org ng-hp --project my-project-front ./build"
},
I run npm run build_sentry
and then npm run preview
to serve build and trigger error button
so you are using the vite plugin and the cli to upload sourcemaps? I recommend removing one or the other.
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!
So it seems I created debug ids two times and uploaded two different packs to Sentry. And latest pack was not the one was running by Vite locally. Interesting that with sourcemap: 'inline'
it worked
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
Configured vite and sentry like that: