Skip to content

Commit 26bf2c8

Browse files
committed
fix(svelte): fix order to v5 first
1 parent 2641389 commit 26bf2c8

File tree

1 file changed

+5
-5
lines changed
  • docs/platforms/javascript/guides/svelte

1 file changed

+5
-5
lines changed

docs/platforms/javascript/guides/svelte/index.mdx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ Configuration should happen as early as possible in your application's lifecycle
4444

4545
To use the SDK, initialize it in your Svelte entry point before bootstrapping your app. In a typical Svelte project, that is your `main.js` or `main.ts` file.
4646

47-
```javascript {tabTitle: Svelte v3-v4} {filename: main.js} {"onboardingOptions": {"performance": "10, 13-20", "session-replay": "11, 23-29"}}
47+
```javascript {tabTitle: Svelte v5+} {filename: main.js} {"onboardingOptions": {"performance": "11, 14-21", "session-replay": "12, 24-30"}}
48+
import { mount } from "svelte";
4849
import "./app.css";
4950
import App from "./App.svelte";
5051

@@ -76,15 +77,14 @@ Sentry.init({
7677
replaysOnErrorSampleRate: 1.0,
7778
});
7879

79-
const app = new App({
80+
const app = mount(App, {
8081
target: document.getElementById("app"),
8182
});
8283

8384
export default app;
8485
```
8586

86-
```javascript {tabTitle: Svelte v5+} {filename: main.js} {"onboardingOptions": {"performance": "11, 14-21", "session-replay": "12, 24-30"}}
87-
import { mount } from "svelte";
87+
```javascript {tabTitle: Svelte v3-v4} {filename: main.js} {"onboardingOptions": {"performance": "10, 13-20", "session-replay": "11, 23-29"}}
8888
import "./app.css";
8989
import App from "./App.svelte";
9090

@@ -116,7 +116,7 @@ Sentry.init({
116116
replaysOnErrorSampleRate: 1.0,
117117
});
118118

119-
const app = mount(App, {
119+
const app = new App({
120120
target: document.getElementById("app"),
121121
});
122122

0 commit comments

Comments
 (0)