Skip to content

feat(utoopack): share runtime in production MPA builds - #143

Merged
xusd320 merged 4 commits into
mainfrom
zoomdong/mpa-shared-runtime
Oct 8, 2026
Merged

xusd320 merged 4 commits into
mainfrom
zoomdong/mpa-shared-runtime

Conversation

@fireairforce

@fireairforce fireairforce commented Oct 8, 2026 •

Copy link
Copy Markdown
Member

Production MPA builds currently embed a separate Utoopack runtime in each page entry. Enable optimization.sharedRuntime by default for production page-client plans and require @utoo/pack ^1.5.23. SPA and development defaults stay unchanged, and configureBundler hooks can explicitly disable sharing.

Make generated MPA entries register under the shell's requested bootstrap URL, using Page/build identity instead of the currently executing runtime script or a potentially stale embedded runtime. This also prevents shell-preloaded entries from mounting themselves. The build identity makes generated Page chunks specific to each output generation. Standalone document startup uses its embedded runtime as the fallback.

Let the shell loader wait for asynchronous module registration after bootstrap onload; this readiness race affects inline runtimes too. Registration listeners retain the request association across independently bundled entries and clean up on success, failure, or timeout.

Validation:

  • Core package builds, npm run check-types, npm run lint, npm test, and git diff --check.
  • Local browser validation of production MPA shared assets, HTML/deployment metadata order, and same-document shell navigation with Utoopack and Webpack, including missing/stale embedded runtime.
  • Temporary checks for concurrent Page/build isolation, URL aliases, and subscription cleanup. No additional smoke-test harness or documentation is included.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-08T07:40:31.488661Z 82d7748 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 82d77487fa

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/client/src/framework/page/react-page.ts
@xusd320
xusd320 merged commit f5da92f into main Oct 8, 2026
1 check passed
@xusd320
xusd320 deleted the zoomdong/mpa-shared-runtime branch October 8, 2026 10:38
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.

2 participants