Skip to content

Commit d0a0384

Browse files
authored
docs(js): Update source map upload docs for rr hydrogen (#15164)
ref getsentry/sentry-javascript#17885
1 parent 5901caf commit d0a0384

File tree

1 file changed

+7
-14
lines changed

1 file changed

+7
-14
lines changed

docs/platforms/javascript/guides/cloudflare/frameworks/hydrogen-react-router.mdx

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -184,19 +184,12 @@ export default defineConfig(config => ({
184184

185185
### Build Configuration
186186

187-
Add the `buildEnd` hook to your `react-router.config.ts`:
187+
Since the `buildEnd` hook will not be executed for Hydrogen, you'll need to manually upload source maps using the [Sentry CLI](/cli/) instead.
188188

189-
```ts {filename:react-router.config.ts}
190-
import type {Config} from '@react-router/dev/config';
191-
import { sentryOnBuildEnd } from '@sentry/react-router';
192-
193-
export default {
194-
appDirectory: 'app',
195-
buildDirectory: 'dist',
196-
ssr: true,
197-
buildEnd: async ({ viteConfig, reactRouterConfig, buildManifest }) => {
198-
// Call this at the end of the hook
199-
(await sentryOnBuildEnd({ viteConfig, reactRouterConfig, buildManifest }));
200-
}
201-
} satisfies Config;
189+
```bash
190+
# Inject debug IDs
191+
sentry-cli sourcemaps inject /path/to/build/dir
192+
# Upload sourcemaps
193+
sentry-cli sourcemaps upload /path/to/build/dir
202194
```
195+

0 commit comments

Comments
 (0)