Skip to content

Fix hydration errors by moving image path resolution to build time #14024

New issue

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

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

Already on GitHub? # to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

sfanahata
Copy link
Contributor

DESCRIBE YOUR PR

We currently have a hydration issue on our docs site. This fixes that issue.

You can check out /hydration-error-refactor-guide.mdc in this branch to see how the refactor was designed and implemented.

IS YOUR CHANGE URGENT?

Help us prioritize incoming PRs by letting us know when the change needs to go live.

  • Urgent deadline (GA date, etc.):
  • Other deadline:
  • None: Not urgent, can wait up to 1 week+

SLA

  • Teamwork makes the dream work, so please add a reviewer to your PRs.
  • Please give the docs team up to 1 week to review your PR unless you've added an urgent due date to it.
    Thanks in advance for your help!

PRE-MERGE CHECKLIST

Make sure you've checked the following before merging your changes:

  • Checked Vercel preview for correctness, including links
  • PR was reviewed and approved by any necessary SMEs (subject matter experts)
  • PR was reviewed and approved by a member of the Sentry docs team

Copy link

vercel bot commented Jun 12, 2025

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

Name Status Preview Comments Updated (UTC)
develop-docs ❌ Failed (Inspect) Jun 18, 2025 7:35am
sentry-docs ❌ Failed (Inspect) Jun 18, 2025 7:35am

Copy link

codecov bot commented Jun 12, 2025

Bundle Report

Changes will increase total bundle size by 360.52kB (1.72%) ⬆️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
sentry-docs-server-cjs 11.23MB 360.52kB (3.32%) ⬆️
sentry-docs-client-array-push 9.77MB -6 bytes (-0.0%) ⬇️

Affected Assets, Files, and Routes:

view changes for bundle: sentry-docs-server-cjs

Assets Changed:

Asset Name Size Change Total Size Change (%)
1729.js -3 bytes 1.63MB -0.0%
../instrumentation.js -3 bytes 957.45kB -0.0%
9523.js -3 bytes 933.5kB -0.0%
../app/[[...path]]/page.js -167 bytes 586.34kB -0.03%
../app/[[...path]]/page.js.nft.json 120.17kB 519.96kB 30.06% ⚠️
../app/platform-redirect/page.js.nft.json 120.17kB 519.87kB 30.07% ⚠️
../app/sitemap.xml/route.js.nft.json 120.17kB 517.84kB 30.22% ⚠️
9567.js 182 bytes 18.84kB 0.98%

Files in ../app/[[...path]]/page.js:

  • ./src/components/docImage.tsx → Total Size: 1.28kB

Files in 9567.js:

  • ./src/remark-image-size.js → Total Size: 1.93kB

  • ./src/mdx.ts → Total Size: 18.21kB

App Routes Affected:

App Route Size Change Total Size Change (%)
/[[...path]] -167 bytes 3.13MB -0.01%
view changes for bundle: sentry-docs-client-array-push

Assets Changed:

Asset Name Size Change Total Size Change (%)
static/chunks/pages/_app-*.js -3 bytes 873.24kB -0.0%
static/chunks/7750-*.js -3 bytes 401.83kB -0.0%
static/oTjMMEvrZxLyui0M2NTGt/_buildManifest.js (New) 616 bytes 616 bytes 100.0% 🚀
static/oTjMMEvrZxLyui0M2NTGt/_ssgManifest.js (New) 77 bytes 77 bytes 100.0% 🚀
static/S37SbyhkV9BofqmDrm3tJ/_buildManifest.js (Deleted) -616 bytes 0 bytes -100.0% 🗑️
static/S37SbyhkV9BofqmDrm3tJ/_ssgManifest.js (Deleted) -77 bytes 0 bytes -100.0% 🗑️

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant