Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ Set `autoInstrument` to `false` to disable auto-instrumentation of any `load` fu

```javascript {filename:vite.config.(js|ts)} {7}
import { sveltekit } from '@sveltejs/kit/vite';
import { sentrySvelteKit } from '@sentry/sveltekit';
import { sentrySvelteKit } from '@sentry/sveltekit/vite';

export default {
plugins: [
Expand All @@ -108,7 +108,7 @@ Set to `false` to disable auto-instrumentation of `load` functions inside `+page

```javascript {filename:vite.config.(js|ts)} {7-10}
import { sveltekit } from "@sveltejs/kit/vite";
import { sentrySvelteKit } from "@sentry/sveltekit";
import { sentrySvelteKit } from "@sentry/sveltekit/vite";

export default {
plugins: [
Expand All @@ -131,7 +131,7 @@ Set to `false` to disable auto-instrumentation of server-only `load` functions i

```javascript {filename:vite.config.(js|ts)} {7-10}
import { sveltekit } from "@sveltejs/kit/vite";
import { sentrySvelteKit } from "@sentry/sveltekit";
import { sentrySvelteKit } from "@sentry/sveltekit/vite";

export default {
plugins: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ Add the `sentrySvelteKit` plugin **before** `sveltekit` in your `vite.config.(js

```javascript {filename:vite.config.(js|ts)} {2,6}
import { sveltekit } from "@sveltejs/kit/vite";
import { sentrySvelteKit } from "@sentry/sveltekit";
import { sentrySvelteKit } from "@sentry/sveltekit/vite";
import { defineConfig } from "vite";

export default defineConfig({
Expand Down Expand Up @@ -400,7 +400,7 @@ To upload source maps for clear error stack traces, add your Sentry auth token,

```javascript {filename:vite.config.(js|ts)} {6-13}
import { sveltekit } from "@sveltejs/kit/vite";
import { sentrySvelteKit } from "@sentry/sveltekit";
import { sentrySvelteKit } from "@sentry/sveltekit/vite";

export default {
plugins: [
Expand Down Expand Up @@ -455,7 +455,7 @@ SENTRY_AUTH_TOKEN=___ORG_AUTH_TOKEN___

```javascript {filename:vite.config.(js|ts)} {7}
import { sveltekit } from "@sveltejs/kit/vite";
import { sentrySvelteKit } from "@sentry/sveltekit";
import { sentrySvelteKit } from "@sentry/sveltekit/vite";

export default {
plugins: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ SENTRY_AUTH_TOKEN=___ORG_AUTH_TOKEN___

```javascript {filename:vite.config.js}
import { sveltekit } from "@sveltejs/kit/vite";
import { sentrySvelteKit } from "@sentry/sveltekit";
import { sentrySvelteKit } from "@sentry/sveltekit/vite";

export default defineConfig({
plugins: [
Expand All @@ -58,7 +58,7 @@ Configure source map behavior in your Vite config:

```javascript {filename:vite.config.js}
import { sveltekit } from "@sveltejs/kit/vite";
import { sentrySvelteKit } from "@sentry/sveltekit";
import { sentrySvelteKit } from "@sentry/sveltekit/vite";

export default defineConfig({
plugins: [
Expand All @@ -78,7 +78,7 @@ By default, `sentrySvelteKit` will try to detect your SvelteKit adapter to confi

```javascript {filename:vite.config.js}
import { sveltekit } from "@sveltejs/kit/vite";
import { sentrySvelteKit } from "@sentry/sveltekit";
import { sentrySvelteKit } from "@sentry/sveltekit/vite";

export default defineConfig({
plugins: [
Expand All @@ -96,7 +96,7 @@ You can disable automatic source maps upload in your Vite config:

```javascript {filename:vite.config.js}
import { sveltekit } from "@sveltejs/kit/vite";
import { sentrySvelteKit } from "@sentry/sveltekit";
import { sentrySvelteKit } from "@sentry/sveltekit/vite";

export default defineConfig({
plugins: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ SENTRY_URL="https://your-sentry-instance.com"

**Option 2**

You can also set your org and project slugs by passing a `sourceMapsUploadOptions` object to `sentrySvelteKit`, as seen in the example below. For a full list of available options, see the [Sentry Vite Plugin documentation](https://www.npmjs.com/package/@sentry/vite-plugin#options).
You can also set your org and project slugs directly in the `sentrySvelteKit` options, as seen in the example below. For a full list of available options, see the [Sentry Vite Plugin documentation](https://www.npmjs.com/package/@sentry/vite-plugin#options).

```javascript {filename:vite.config.(js|ts)} {6-12}
import { sveltekit } from "@sveltejs/kit/vite";
import { sentrySvelteKit } from "@sentry/sveltekit";
import { sentrySvelteKit } from "@sentry/sveltekit/vite";

export default {
plugins: [
Expand All @@ -36,7 +36,7 @@ export default {
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/",
// sentryUrl: "https://your-self-hosted-sentry.com/",
}),
sveltekit(),
],
Expand All @@ -60,7 +60,7 @@ By default, `sentrySvelteKit` will try to detect your SvelteKit adapter to confi

```javascript {filename:vite.config.(js|ts)} {7}
import { sveltekit } from "@sveltejs/kit/vite";
import { sentrySvelteKit } from "@sentry/sveltekit";
import { sentrySvelteKit } from "@sentry/sveltekit/vite";

export default {
plugins: [
Expand All @@ -79,7 +79,7 @@ You can disable automatic source maps upload in your Vite config:

```javascript {filename:vite.config.(js|ts)} {7}
import { sveltekit } from "@sveltejs/kit/vite";
import { sentrySvelteKit } from "@sentry/sveltekit";
import { sentrySvelteKit } from "@sentry/sveltekit/vite";

export default {
plugins: [
Expand Down
Loading