Skip to content
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

feat: docs/** content hot reload #9842

Merged
merged 3 commits into from May 8, 2024
Merged

feat: docs/** content hot reload #9842

merged 3 commits into from May 8, 2024

Conversation

a-hariti
Copy link
Collaborator

Authoring quality of life improvement

Next.js seems to be blind to content changes under /docs/**/ because content files are outside the module dependency graph

There's no obvious way in the docs to let Next.js know about the changes directly

This is workaround establishes a Web Socket connection with a backend file watcher and triggers a hot reload as needed.

This solution should add ~0 js to the bundle sizse.

Closes #9038

Copy link

vercel bot commented Apr 27, 2024

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 May 8, 2024 11:10am

@a-hariti a-hariti changed the title feat: docs/** content change hot reload feat: docs/** content hot reload Apr 27, 2024
Copy link
Contributor

@stephanie-anderson stephanie-anderson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

omg, thanks so much!! 🙏

Copy link

codecov bot commented Apr 29, 2024

Bundle Report

Changes will increase total bundle size by 984 bytes ⬆️

Bundle name Size Change
sentry-docs-server 7.42MB 563 bytes ⬆️
sentry-docs-edge-server 456.19kB 3 bytes ⬇️
sentry-docs-client 6.16MB 424 bytes ⬆️

@a-hariti a-hariti merged commit dc9a64e into master May 8, 2024
8 checks passed
@a-hariti a-hariti deleted the content-hot-reload branch May 8, 2024 14:41
antonpirker pushed a commit that referenced this pull request May 14, 2024
* feat: docs/** content hot reload
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Markdown file changes don't trigger hot reloads
2 participants