Skip to content

Commit aafc199

Browse files
authored
docs(react-router): Update source maps section for a PR (#13610)
<!-- Use this checklist to make sure your PR is ready for merge. You may delete any sections you don't need. --> ## DESCRIBE YOUR PR Should document changes made in getsentry/sentry-javascript#16197 TL;DR: Users no longer need to pass SentryOptions to the Vite global config—this is now handled under the hood by the React Router Vite plugin. <img width="762" alt="Screenshot 2025-05-06 at 10 44 20 AM" src="https://github.com/user-attachments/assets/e7618662-dcc2-45c0-abed-c4c71a259762" /> ## LEGAL BOILERPLATE <!-- Sentry employees and contractors can delete or ignore this section. --> Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. and is gonna need some rights from me in order to utilize my contributions in this here PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms. ## EXTRA RESOURCES - [Sentry Docs contributor guide](https://docs.sentry.io/contributing/)
1 parent 6a96b61 commit aafc199

File tree

1 file changed

+1
-2
lines changed
  • docs/platforms/javascript/guides/react-router

1 file changed

+1
-2
lines changed

docs/platforms/javascript/guides/react-router/index.mdx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ Update the `start` and `dev` script to include the instrumentation file:
317317

318318
## Source Maps Upload
319319

320-
Update `vite.config.ts` to include the `sentryReactRouter` plugin. Also add your `SentryReactRouterBuildOptions` config options to the Vite config (this is required for uploading source maps at the end of the build):
320+
Update `vite.config.ts` to include the `sentryReactRouter` plugin, making sure to pass both the Vite and Sentry configurations to it:
321321

322322
<OrgAuthTokenNote />
323323

@@ -338,7 +338,6 @@ const sentryConfig: SentryReactRouterBuildOptions = {
338338
export default defineConfig(config => {
339339
return {
340340
+ plugins: [reactRouter(),sentryReactRouter(sentryConfig, config)],
341-
+ sentryConfig, // Also pass the config here!
342341
};
343342
});
344343
```

0 commit comments

Comments
 (0)