Skip to content

docs(js): Update react-router docs for import flags #14107

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

chargome
Copy link
Member

Documentation for React Router was updated to provide an alternative setup for environments where the NODE_OPTIONS --import flag is not supported.

  • A new subsection, "Alternative Setup for Hosting Platforms," was added under the "Update Scripts" section in docs/platforms/javascript/guides/react-router/index.mdx.
  • This section addresses platforms like Vercel and Netlify, where direct import of the instrumentation file is necessary.
  • Instructions were added to import ./instrument.server.mjs at the top of entry.server.tsx.
  • A code example demonstrates this direct import.
  • A warning alert was included to clarify that this alternative method results in incomplete auto-instrumentation and should only be used when the --import flag is not an option.

ref getsentry/sentry-javascript#15198

@chargome chargome self-assigned this Jun 23, 2025
Copy link

vercel bot commented Jun 23, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
sentry-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 23, 2025 0:12am
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
develop-docs ⬜️ Ignored (Inspect) Visit Preview Jun 23, 2025 0:12am

Copy link

codecov bot commented Jun 23, 2025

Bundle Report

Bundle size has no change ✅

Affected Assets, Files, and Routes:

view changes for bundle: sentry-docs-client-array-push

Assets Changed:

Asset Name Size Change Total Size Change (%)
server/middleware-*.js -5.55kB 1.0kB -84.74%
server/middleware-*.js 5.55kB 6.55kB 555.3% ⚠️
static/ycK2_TFBBx-*.js (New) 684 bytes 684 bytes 100.0% 🚀
static/ycK2_TFBBx-*.js (New) 77 bytes 77 bytes 100.0% 🚀
static/QfEJKV3U7ZGS6xl7ELTOP/_buildManifest.js (Deleted) -684 bytes 0 bytes -100.0% 🗑️
static/QfEJKV3U7ZGS6xl7ELTOP/_ssgManifest.js (Deleted) -77 bytes 0 bytes -100.0% 🗑️

@chargome chargome merged commit e3ba04a into master Jun 23, 2025
12 checks passed
@chargome chargome deleted the cursor/update-react-router-docs-for-import-flags-bfbb branch June 23, 2025 14:40
@github-actions github-actions bot locked and limited conversation to collaborators Jul 9, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants