Skip to content

docs(wiki): record bundler runtime assets#5938

Open
killagu wants to merge 1 commit intonextfrom
agent/egg-doc/21d21a67
Open

docs(wiki): record bundler runtime assets#5938
killagu wants to merge 1 commit intonextfrom
agent/egg-doc/21d21a67

Conversation

@killagu
Copy link
Copy Markdown
Contributor

@killagu killagu commented May 7, 2026

Summary

  • update the Egg Bundler wiki page for runtime asset copying and tegg manifest path normalization
  • add the 2026-05-08 wiki log entry for the latest next branch doc sync

Verification

  • git diff --check
  • utoo execute oxfmt --check wiki/log.md wiki/packages/egg-bundler.md

Summary by CodeRabbit

Release Notes

  • Documentation
    • Updated egg-bundler package documentation with details on runtime asset handling and module loader behavior
    • Added new wiki log entry for recent egg-bundler and tegg loader updates

Copilot AI review requested due to automatic review settings May 7, 2026 18:04
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 7, 2026

Review Change Stack

📝 Walkthrough

Walkthrough

Documentation updates to egg-bundler wiki pages describing runtime asset copying behavior, tegg module reference path normalization via shared module maps, and bundle module loader preference with dynamic-import fallback. Wiki log entry records the 2026-05-08 documentation changes.

Changes

Egg-bundler Runtime and Loader Documentation

Layer / File(s) Summary
Wiki Log Entry
wiki/log.md
New 2026-05-08 log entry documenting egg-bundler runtime asset copying defaults/configurability, tegg manifest path normalization, and module loader preference with fallback.
Bundle Metadata and Output
wiki/packages/egg-bundler.md
Timestamp updated to 2026-05-08. Documentation clarifies that Bundler copies runtimeAssets to output directory and writes bundle-manifest.json with absolute paths.
Runtime Execution and Loader Behavior
wiki/packages/egg-bundler.md
Expanded "Current Behavior" section documents runtime asset scanning/force-copy rules, single-process worker entry framework specifier mapping, ManifestLoader normalizing tegg moduleReferences/moduleDescriptors through shared module map, and module loader using globalThis.__EGG_BUNDLE_MODULE_LOADER__ with dynamic-import fallback.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

  • eggjs/egg#5931: Implements runtime asset copy logic and adds copied asset paths to bundle-manifest chunks, which this PR documents.
  • eggjs/egg#5921: Implements tegg loader path normalization and bundle module-map resolution that this PR documents.
  • eggjs/egg#5903: Implements setBundleModuleLoader API that sets globalThis.__EGG_BUNDLE_MODULE_LOADER__ mentioned in this documentation.

Suggested reviewers

  • fengmk2

Poem

A bundler hops with measured care,
Copying assets here and there,
Paths normalize, loaders dance,
With fallbacks as their second chance—
🐰 Docs are written, all is fair!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title 'docs(wiki): record bundler runtime assets' accurately summarizes the main changes, which involve documenting updated bundler runtime asset behavior and tegg manifest path normalization.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch agent/egg-doc/21d21a67

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@cloudflare-workers-and-pages
Copy link
Copy Markdown

Deploying egg with  Cloudflare Pages  Cloudflare Pages

Latest commit: b8a2ce9
Status: ✅  Deploy successful!
Preview URL: https://a1bcbcb7.egg-cci.pages.dev
Branch Preview URL: https://agent-egg-doc-21d21a67.egg-cci.pages.dev

View logs

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request updates the documentation for the egg-bundler package to reflect new features including runtime asset copying and tegg manifest path normalization. The changes detail how the bundler handles assets in the app directory and how ManifestLoader ensures consistent module paths. Review feedback identifies an incomplete list of skipped file extensions in the documentation and suggests clarifying the terminology regarding the 'startup manifest' to distinguish it from the generated bundle-manifest.json file.

Comment on lines +52 to +53
baseDir-relative output paths. Source-like files such as `.js`, `.ts`, `.mjs`,
and `.cjs` are skipped outside force-copy directories, and manifest-known
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

The list of skipped source-like extensions is incomplete. The implementation in Bundler.ts (line 44) defines BUNDLED_SOURCE_EXTENSIONS as including .cts, .jsx, .mts, and .tsx in addition to the ones currently listed. Updating this list will provide more accurate guidance for users.

Suggested change
baseDir-relative output paths. Source-like files such as `.js`, `.ts`, `.mjs`,
and `.cjs` are skipped outside force-copy directories, and manifest-known
baseDir-relative output paths. Source-like files such as `.js`, `.ts`, `.mjs`,
`.cjs`, `.mts`, `.cts`, `.tsx`, and `.jsx` are skipped outside force-copy directories, and manifest-known

absolute paths, and manifest `resolveCache` request aliases.
- `ManifestLoader` normalizes tegg `moduleReferences` and `moduleDescriptors`
through the same module map so descriptors and references use matching
app-relative or package-normalized paths in the bundle manifest. Decorated
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

The term "bundle manifest" is ambiguous here because the bundler now also generates a separate bundle-manifest.json file (as noted in step 6). In this context, it refers to the app startup manifest that is embedded into the worker entry. Using "startup manifest" (consistent with line 31) would be clearer.

Suggested change
app-relative or package-normalized paths in the bundle manifest. Decorated
app-relative or package-normalized paths in the startup manifest. Decorated

@cloudflare-workers-and-pages
Copy link
Copy Markdown

Deploying egg-v3 with  Cloudflare Pages  Cloudflare Pages

Latest commit: b8a2ce9
Status: ✅  Deploy successful!
Preview URL: https://0fb9f487.egg-v3.pages.dev
Branch Preview URL: https://agent-egg-doc-21d21a67.egg-v3.pages.dev

View logs

Copy link
Copy Markdown
Contributor

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

Updates the internal wiki documentation for @eggjs/egg-bundler to reflect the current runtime behavior around (a) copying runtime assets into the bundle output and (b) tegg-related manifest path normalization, and records the change in the wiki log.

Changes:

  • Document bundler runtime asset copying (bundle.runtimeAssets config, defaults, and skip rules).
  • Document tegg manifest moduleReferences / moduleDescriptors path normalization and runtime loading behavior.
  • Add a 2026-05-08 wiki log entry for this documentation sync.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
wiki/packages/egg-bundler.md Updates the bundler “Bundle Flow” and “Current Behavior” sections to include runtime asset copying and tegg path normalization details.
wiki/log.md Adds a 2026-05-08 entry recording the doc sync for runtime assets and tegg manifest normalization.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
wiki/packages/egg-bundler.md (1)

37-38: 💤 Low value

Consider explicitly mentioning manifest chunk inclusion for assets.

The wiki log entry (line 9) mentions "bundle manifest chunk inclusion for copied assets," but line 38 only states that the bundler "writes bundle-manifest.json" without explicitly documenting that the manifest includes information about copied runtime assets. If the manifest includes asset chunks or references, consider adding that detail here for completeness.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@wiki/packages/egg-bundler.md` around lines 37 - 38, The documentation
currently says `Bundler` "writes bundle-manifest.json" but doesn't state that
the manifest includes chunk entries or references for copied runtime assets;
update the description of `Bundler` to explicitly state that
`bundle-manifest.json` contains metadata for copied runtime assets (asset chunk
entries or references) and that these manifest entries correspond to the
absolute output paths returned by `Bundler`, so consumers know the manifest
lists the copied asset chunks and their paths.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@wiki/packages/egg-bundler.md`:
- Around line 37-38: The documentation currently says `Bundler` "writes
bundle-manifest.json" but doesn't state that the manifest includes chunk entries
or references for copied runtime assets; update the description of `Bundler` to
explicitly state that `bundle-manifest.json` contains metadata for copied
runtime assets (asset chunk entries or references) and that these manifest
entries correspond to the absolute output paths returned by `Bundler`, so
consumers know the manifest lists the copied asset chunks and their paths.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 7f6eaed1-bec3-46cc-a3ec-eb32805be274

📥 Commits

Reviewing files that changed from the base of the PR and between 0ebb28e and b8a2ce9.

📒 Files selected for processing (2)
  • wiki/log.md
  • wiki/packages/egg-bundler.md

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