-
Notifications
You must be signed in to change notification settings - Fork 2.1k
feat: support custom props when render document #7099
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
Conversation
ClarkXia
commented
May 27, 2025
- feat: support custom props when render document
- fix: minify server bundle when build in prod
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
A PR to allow passing custom properties to the rendered Document component and to minify the server bundle in production.
- Introduce a new
documentProps
option across render APIs and propagate it into<Document>
- Toggle esbuild’s
minify
option based on thedev
flag for production builds
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.
Show a summary per file
File | Description |
---|---|
packages/runtime/src/types.ts | Added documentProps to RenderOptions |
packages/runtime/src/runServerApp.tsx | Destructured and passed documentProps into renderDocument |
packages/runtime/src/renderDocument.tsx | Accepted and spread documentProps when instantiating <Document> |
packages/ice/templates/core/entry.server.ts.ejs | Updated server entry template to include documentProps |
packages/ice/src/service/serverCompiler.ts | Enabled minify flag in esbuild options for production builds |
.changeset/wild-chicken-brake.md | Changeset entry for @ice/app minification fix |
.changeset/loud-mirrors-whisper.md | Changeset entry for @ice/runtime documentProps feature |
Comments suppressed due to low confidence (1)
packages/runtime/src/renderDocument.tsx:89
- Add a unit or integration test to verify that
documentProps
actually flow through and render correctly on theDocument
component.
Document && <Document pagePath={routePath} {...(documentProps || {})} />
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## release/next #7099 +/- ##
===============================================
Coverage ? 78.84%
===============================================
Files ? 222
Lines ? 20053
Branches ? 2521
===============================================
Hits ? 15810
Misses ? 4203
Partials ? 40 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|