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/sveltekit
SDK Version
8.12.0
Framework Version
2.5.7
Link to Sentry event
No response
SDK Setup
In hooks.client.ts
:
Sentry.init({
dsn: PUBLIC_SENTRY_DSN,
sampleRate: dev ? 0 : 1,
tracesSampleRate: dev ? 0 : 1,
replaysSessionSampleRate: environment === 'production' ? 0.1 : 0,
replaysOnErrorSampleRate: environment === 'production' ? 0.1 : 0,
integrations: environment === 'production' ? [Sentry.replayIntegration()] : [],
debug: dev,
environment,
normalizeDepth: 10
});
In hooks.server.ts
:
Sentry.init({
dsn: PUBLIC_SENTRY_DSN,
sampleRate: dev ? 0 : 1,
tracesSampleRate: dev ? 0 : 1,
debug: dev,
environment,
normalizeDepth: 10
});
My vite.config.ts
:
import { paraglide } from '@inlang/paraglide-js-adapter-sveltekit/vite';
import { sentrySvelteKit } from '@sentry/sveltekit';
import { sveltekit } from '@sveltejs/kit/vite';
import { defineConfig } from 'vitest/config';
// @ts-expect-error mode is not defined in vite config
export default ({ mode }) => {
return defineConfig({
build: { sourcemap: true },
plugins: [
paraglide({
project: './project.inlang',
outdir: './src/lib/paraglide'
}),
sentrySvelteKit({
sourceMapsUploadOptions: {
org: '4eign',
project: 'platform',
authToken: process.env.SENTRY_AUTH_TOKEN_USER,
sourcemaps: {
filesToDeleteAfterUpload: [ './**/*.map' ]
}
},
debug: mode === 'development',
adapter: 'vercel'
}),
sveltekit()
],
test: {
include: ['src/**/*.{test,spec}.{js,ts}']
}
});
};
Steps to Reproduce
- Deploy to vercel (running
vite build
) - Expect that sourcemaps have been deleted and are not visible in browser devtools
- Observe that:
- they have not been deleted (still visible in vercel source output)
- they are still visible in browser devtools
Expected Result
Deleted sourcemaps
Actual Result
Visible sourcemaps
Metadata
Metadata
Assignees
Type
Projects
Status
No status