Skip to content

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

Merged
merged 8 commits into from
Jun 30, 2025
Merged

Conversation

ClarkXia
Copy link
Collaborator

  • feat: support custom props when render document
  • fix: minify server bundle when build in prod

@ClarkXia ClarkXia requested a review from Copilot May 27, 2025 06:37
Copy link
Contributor

@Copilot Copilot AI left a 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 the dev 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 the Document component.
Document && <Document pagePath={routePath} {...(documentProps || {})} />

ClarkXia and others added 2 commits May 27, 2025 14:43
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@alibaba alibaba deleted a comment from Copilot AI May 27, 2025
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Please upload report for BASE (release/next@3670ead). Learn more about missing BASE report.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Base automatically changed from release/next to master June 24, 2025 02:42
@ClarkXia ClarkXia requested review from XGHeaven and XXXMrG June 30, 2025 02:42
@ClarkXia ClarkXia merged commit cc0792b into master Jun 30, 2025
7 checks passed
@ClarkXia ClarkXia deleted the feat/document-data branch June 30, 2025 03:17
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.

4 participants