From 3e0c367d9f39ddcbb5009f1a6dad4153bbe3f8dd Mon Sep 17 00:00:00 2001 From: s1gr1d Date: Wed, 22 Oct 2025 15:36:22 +0200 Subject: [PATCH 1/2] docs(svelteKit): Update build-time options for source maps --- .../sveltekit/configuration/build/index.mdx | 24 +++++++++------- .../javascript.solidstart.mdx | 6 ++-- .../javascript.sveltekit.mdx | 6 ++-- .../javascript.sveltekit.mdx | 10 +++---- .../overview/javascript.solidstart.mdx | 28 ++++++++----------- .../overview/javascript.sveltekit.mdx | 16 ++++------- .../upload/primer/javascript.sveltekit.mdx | 12 ++++---- 7 files changed, 44 insertions(+), 58 deletions(-) diff --git a/docs/platforms/javascript/guides/sveltekit/configuration/build/index.mdx b/docs/platforms/javascript/guides/sveltekit/configuration/build/index.mdx index b9d3952da86824..45f5f1af9070d2 100644 --- a/docs/platforms/javascript/guides/sveltekit/configuration/build/index.mdx +++ b/docs/platforms/javascript/guides/sveltekit/configuration/build/index.mdx @@ -22,38 +22,42 @@ The Sentry SvelteKit SDK supports automatic code instrumentation and source map -## Source Maps Options +## General Options + +Those options can be set on the root level of the `sentrySvelteKit` configuration object. Most of them are relevant for the source map upload process. - + -The slug of the Sentry organization associated with the app. + The slug of the Sentry organization associated with the app. - + -The slug of the Sentry project associated with the app. + The slug of the Sentry project associated with the app. - + -The authentication token to use for all communication with Sentry. Can be obtained from https://sentry.io/orgredirect/organizations/:orgslug/settings/auth-tokens/. + The authentication token to use for all communication with Sentry. Can be obtained from https://sentry.io/orgredirect/organizations/:orgslug/settings/auth-tokens/. - + -The base URL of your Sentry instance. Only relevant if you're using a self-hosted or Sentry instance other than sentry.io. + The base URL of your Sentry instance. Only relevant if you're using a self-hosted or Sentry instance other than sentry.io. -By default, `sentrySvelteKit` will try to detect your SvelteKit adapter to configure the source maps upload correctly. If you're not using one of the [supported adapters](/platforms/javascript/guides/sveltekit/) or the wrong one is detected, you can override the adapter detection using the `adapter` option. + By default, `sentrySvelteKit` will try to detect your SvelteKit adapter to configure the source maps upload correctly. If you're not using one of the [supported adapters](/platforms/javascript/guides/sveltekit/) or the wrong one is detected, you can override the adapter detection using the `adapter` option. +## Source Maps Options + Disable automatic source maps upload by setting `autoUploadSourceMaps` to `false`. diff --git a/platform-includes/configuration/filter-application-key/javascript.solidstart.mdx b/platform-includes/configuration/filter-application-key/javascript.solidstart.mdx index 8c5781af562132..d69ba844d017fd 100644 --- a/platform-includes/configuration/filter-application-key/javascript.solidstart.mdx +++ b/platform-includes/configuration/filter-application-key/javascript.solidstart.mdx @@ -5,10 +5,8 @@ export default defineConfig( /* Your SolidStart config */ }, { - sourceMapsUploadOptions: { - unstable_sentryVitePluginOptions: { - applicationKey: "your-custom-application-key", - }, + unstable_sentryVitePluginOptions: { + applicationKey: "your-custom-application-key", }, }, ), diff --git a/platform-includes/configuration/filter-application-key/javascript.sveltekit.mdx b/platform-includes/configuration/filter-application-key/javascript.sveltekit.mdx index 4bd8888dc8416b..c9fcebf40200cf 100644 --- a/platform-includes/configuration/filter-application-key/javascript.sveltekit.mdx +++ b/platform-includes/configuration/filter-application-key/javascript.sveltekit.mdx @@ -2,10 +2,8 @@ export default defineConfig({ plugins: [ sentrySvelteKit({ - sourceMapsUploadOptions: { - unstable_sentryVitePluginOptions: { - applicationKey: "your-custom-application-key", - }, + unstable_sentryVitePluginOptions: { + applicationKey: "your-custom-application-key", }, }) ] diff --git a/platform-includes/getting-started-complete/javascript.sveltekit.mdx b/platform-includes/getting-started-complete/javascript.sveltekit.mdx index 3bca2bae88266c..e3ffb0a47efce1 100644 --- a/platform-includes/getting-started-complete/javascript.sveltekit.mdx +++ b/platform-includes/getting-started-complete/javascript.sveltekit.mdx @@ -320,12 +320,10 @@ import { sentrySvelteKit } from "@sentry/sveltekit"; export default { plugins: [ sentrySvelteKit({ - sourceMapsUploadOptions: { - org: "___ORG_SLUG___", - project: "___PROJECT_SLUG___", - // store your auth token in an environment variable - authToken: process.env.SENTRY_AUTH_TOKEN, - }, + org: "___ORG_SLUG___", + project: "___PROJECT_SLUG___", + // store your auth token in an environment variable + authToken: process.env.SENTRY_AUTH_TOKEN, }), sveltekit(), ], diff --git a/platform-includes/sourcemaps/overview/javascript.solidstart.mdx b/platform-includes/sourcemaps/overview/javascript.solidstart.mdx index e6073ec5bda641..d98f2df9d3a8a4 100644 --- a/platform-includes/sourcemaps/overview/javascript.solidstart.mdx +++ b/platform-includes/sourcemaps/overview/javascript.solidstart.mdx @@ -31,11 +31,9 @@ export default defineConfig( /* Your SolidStart config */ }, { - sourceMapsUploadOptions: { - org: "___ORG_SLUG___", - project: "___PROJECT_SLUG___", - authToken: process.env.SENTRY_AUTH_TOKEN, - }, + org: "___ORG_SLUG___", + project: "___PROJECT_SLUG___", + authToken: process.env.SENTRY_AUTH_TOKEN, }, ), ); @@ -52,15 +50,13 @@ export default defineConfig( /* Your SolidStart config */ }, { - sourceMapsUploadOptions: { - org: "___ORG_SLUG___", - project: "___PROJECT_SLUG___", - authToken: process.env.SENTRY_AUTH_TOKEN, - sourcemaps: { - assets: ["./dist/**/*"], - ignore: ["**/node_modules/**"], - filesToDeleteAfterUpload: ["./dist/**/*.map"], - }, + org: "___ORG_SLUG___", + project: "___PROJECT_SLUG___", + authToken: process.env.SENTRY_AUTH_TOKEN, + sourcemaps: { + assets: ["./dist/**/*"], + ignore: ["**/node_modules/**"], + filesToDeleteAfterUpload: ["./dist/**/*.map"], }, }, ), @@ -78,9 +74,7 @@ export default defineConfig( /* Your SolidStart config */ }, { - sourceMapsUploadOptions: { - enabled: false, - }, + disable: true, }, ), ); diff --git a/platform-includes/sourcemaps/overview/javascript.sveltekit.mdx b/platform-includes/sourcemaps/overview/javascript.sveltekit.mdx index c0e7680a867005..d56d6e9fd6a1c1 100644 --- a/platform-includes/sourcemaps/overview/javascript.sveltekit.mdx +++ b/platform-includes/sourcemaps/overview/javascript.sveltekit.mdx @@ -41,11 +41,9 @@ import { sentrySvelteKit } from "@sentry/sveltekit"; export default defineConfig({ plugins: [ sentrySvelteKit({ - sourceMapsUploadOptions: { - org: "___ORG_SLUG___", - project: "___PROJECT_SLUG___", - authToken: process.env.SENTRY_AUTH_TOKEN, - }, + org: "___ORG_SLUG___", + project: "___PROJECT_SLUG___", + authToken: process.env.SENTRY_AUTH_TOKEN, }), sveltekit(), ], @@ -63,11 +61,9 @@ import { sentrySvelteKit } from "@sentry/sveltekit"; export default defineConfig({ plugins: [ sentrySvelteKit({ - sourceMapsUploadOptions: { - org: "___ORG_SLUG___", - project: "___PROJECT_SLUG___", - authToken: process.env.SENTRY_AUTH_TOKEN, - }, + org: "___ORG_SLUG___", + project: "___PROJECT_SLUG___", + authToken: process.env.SENTRY_AUTH_TOKEN, }), sveltekit(), ], diff --git a/platform-includes/sourcemaps/upload/primer/javascript.sveltekit.mdx b/platform-includes/sourcemaps/upload/primer/javascript.sveltekit.mdx index 1b0f37a34f78d9..5a66e226cfa11b 100644 --- a/platform-includes/sourcemaps/upload/primer/javascript.sveltekit.mdx +++ b/platform-includes/sourcemaps/upload/primer/javascript.sveltekit.mdx @@ -32,13 +32,11 @@ import { sentrySvelteKit } from "@sentry/sveltekit"; export default { plugins: [ sentrySvelteKit({ - sourceMapsUploadOptions: { - org: "___ORG_SLUG___", - project: "___PROJECT_SLUG___", - authToken: process.env.SENTRY_AUTH_TOKEN, - // If you're self-hosting Sentry, also add your instance URL: - // url: "https://your-self-hosted-sentry.com/", - }, + org: "___ORG_SLUG___", + project: "___PROJECT_SLUG___", + authToken: process.env.SENTRY_AUTH_TOKEN, + // If you're self-hosting Sentry, also add your instance URL: + // url: "https://your-self-hosted-sentry.com/", }), sveltekit(), ], From 07001fba6b67aca82a70dddc1eaa77c37dbec263 Mon Sep 17 00:00:00 2001 From: Sigrid Huemer <32902192+s1gr1d@users.noreply.github.com> Date: Thu, 23 Oct 2025 16:31:11 +0200 Subject: [PATCH 2/2] Apply suggestion from @coolguyzone Co-authored-by: Alex Krawiec --- .../javascript/guides/sveltekit/configuration/build/index.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/platforms/javascript/guides/sveltekit/configuration/build/index.mdx b/docs/platforms/javascript/guides/sveltekit/configuration/build/index.mdx index 45f5f1af9070d2..ad6089b21b8ffc 100644 --- a/docs/platforms/javascript/guides/sveltekit/configuration/build/index.mdx +++ b/docs/platforms/javascript/guides/sveltekit/configuration/build/index.mdx @@ -24,7 +24,7 @@ The Sentry SvelteKit SDK supports automatic code instrumentation and source map ## General Options -Those options can be set on the root level of the `sentrySvelteKit` configuration object. Most of them are relevant for the source map upload process. +These options can be set on the root level of the `sentrySvelteKit` configuration object. Most of them are relevant for the source map upload process.