@@ -209,7 +209,7 @@ Update `vite.config.ts` to include the `sentryReactRouter` plugin. Also add your
209209
210210<OrgAuthTokenNote />
211211
212- ``` typescript {filename: vite.config.ts}
212+ ``` typescript {filename: vite.config.ts} {diff}
213213import { reactRouter } from ' @react-router/dev/vite' ;
214214import { sentryReactRouter , type SentryReactRouterBuildOptions } from ' @sentry/react-router' ;
215215import { defineConfig } from ' vite' ;
@@ -225,15 +225,15 @@ const sentryConfig: SentryReactRouterBuildOptions = {
225225
226226export default defineConfig (config => {
227227 return {
228- plugins: [reactRouter (), sentryReactRouter (sentryConfig , config )],
229- sentryConfig ,
228+ + plugins: [reactRouter (),sentryReactRouter (sentryConfig , config )],
229+ + sentryConfig , // Also pass the config here!
230230 };
231231});
232232```
233233
234234Include the ` sentryOnBuildEnd ` hook in ` react-router.config.ts ` :
235235
236- ``` typescript {filename: react-router.config.ts} {9 }
236+ ``` typescript {filename: react-router.config.ts} {diff }
237237import type { Config } from ' @react-router/dev/config' ;
238238import { sentryOnBuildEnd } from ' @sentry/react-router' ;
239239
@@ -242,7 +242,7 @@ export default {
242242 buildEnd : async ({ viteConfig , reactRouterConfig , buildManifest }) => {
243243 // ...
244244 // Call this at the end of the hook
245- await sentryOnBuildEnd ({ viteConfig , reactRouterConfig , buildManifest });
245+ + await sentryOnBuildEnd ({ viteConfig , reactRouterConfig , buildManifest });
246246 },
247247} satisfies Config ;
248248```
0 commit comments