GitHub

Original file line numberDiff line numberDiff line change

@@ -3,7 +3,7 @@

33

// https://docs.sentry.io/platforms/javascript/guides/nextjs/

44
55

import * as Sentry from "@sentry/nextjs";

6-
6+

export const onRouterTransitionStart = Sentry.captureRouterTransitionStart

77

Sentry.init({

88

dsn: "https://1cad6b69367913399c1afbfc1c2ce4f4@o4506532749901824.ingest.us.sentry.io/4506532751081472",

99
Original file line numberDiff line numberDiff line change

@@ -2,4 +2,4 @@

22

/// <reference types="next/image-types/global" />

33
44

// NOTE: This file should not be edited

5-

// see https://nextjs.org/docs/basic-features/typescript for more information.

5+

// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.

Original file line numberDiff line numberDiff line change

@@ -28,7 +28,7 @@

2828

"@mdx-js/react": "^3.0.1",

2929

"@netlify/plugin-nextjs": "^5.11.4",

3030

"@next/mdx": "^14.2.4",

31-

"@sentry/nextjs": "^8.17.0",

31+

"@sentry/nextjs": "^9.34.0",

3232

"@types/mdx": "^2.0.13",

3333

"front-matter": "^4.0.2",

3434

"human-readable-ids": "^1.0.4",

Original file line numberDiff line numberDiff line change

@@ -8,8 +8,8 @@ export type UserProfileRscProps = {

88
99

const defaultUser: User = { name: 'John Doe', age: 30 }

1010
11-

export function UserProfileRsc(props: UserProfileRscProps) {

12-

const cookieStore = cookies();

11+

export async function UserProfileRsc(props: UserProfileRscProps) {

12+

const cookieStore = await cookies();

1313
1414

const user = cookieStore.get("user-2");

1515

const serverCookie = cookieStore.get("server-cookie");

Original file line numberDiff line numberDiff line change

@@ -1,3 +1,5 @@

1+

import * as Sentry from "@sentry/nextjs";

2+
13

export async function register() {

24

if (process.env.NEXT_RUNTIME === 'nodejs') {

35

await import('../sentry.server.config');

@@ -7,3 +9,6 @@ export async function register() {

79

await import('../sentry.edge.config');

810

}

911

}

12+
13+

export const onRequestError = Sentry.captureRequestError;

14+
Original file line numberDiff line numberDiff line change

@@ -1,6 +1,10 @@

11

{

22

"compilerOptions": {

3-

"lib": ["dom", "dom.iterable", "esnext"],

3+

"lib": [

4+

"dom",

5+

"dom.iterable",

6+

"esnext"

7+

],

48

"allowJs": true,

59

"skipLibCheck": true,

610

"strict": true,

@@ -18,9 +22,23 @@

1822

}

1923

],

2024

"paths": {

21-

"@/*": ["./src/*"]

22-

}

25+

"@/*": [

26+

"./src/*"

27+

]

28+

},

29+

"target": "ES2017"

2330

},

24-

"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts", "jest.config.js", "src/routes/drafts/testing_patterns_changing_a_leaf_breaks_the_root.mdx"],

25-

"exclude": ["node_modules", ".next", "cypress"]

31+

"include": [

32+

"next-env.d.ts",

33+

"**/*.ts",

34+

"**/*.tsx",

35+

".next/types/**/*.ts",

36+

"jest.config.js",

37+

"src/routes/drafts/testing_patterns_changing_a_leaf_breaks_the_root.mdx"

38+

],

39+

"exclude": [

40+

"node_modules",

41+

".next",

42+

"cypress"

43+

]

2644

}

Read the original on github.com ↗