Strip prerender-only entry specifiers from SSR manifest to prevent stale chunk references - #17841
Merged
Merged
Conversation
🦋 Changeset detectedLatest commit: 261d60e The changes in this PR will be included in the next version bump. This PR includes changesets to release 423 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Merging this PR will improve performance by 18.54%
|
| Mode | Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|---|
| ⚡ | Simulation | Build: hybrid site (static + server) |
1.7 s | 1.5 s | +18.54% |
Tip
Curious why performance improved? Comment @codspeedbot explain why performance improved on this PR, or directly use the CodSpeed MCP with your agent.
Comparing factory/fix-17838 (261d60e) with main (db7c53b)1
Footnotes
matthewp
approved these changes
Aug 27, 2026
Merged
dadezzz
pushed a commit
to dadezzz/university_notes
that referenced
this pull request
Aug 31, 2026
This PR contains the following updates: | Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) | |---|---|---|---| | [astro](https://astro.build) ([source](https://github.com/withastro/astro/tree/HEAD/packages/astro)) | [`7.2.8` → `7.2.9`](https://renovatebot.com/diffs/npm/astro/7.2.8/7.2.9) |  |  | --- ### Release Notes <details> <summary>withastro/astro (astro)</summary> ### [`v7.2.9`](https://github.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#729) [Compare Source](https://github.com/withastro/astro/compare/astro@7.2.8...astro@7.2.9) ##### Patch Changes - [#​17846](withastro/astro#17846) [`b441180`](withastro/astro@b441180) Thanks [@​Princesseuh](https://github.com/Princesseuh)! - Fixes importing `.html` files not being typed outside of `.astro` files - [#​17831](withastro/astro#17831) [`32e8b44`](withastro/astro@32e8b44) Thanks [@​astro-factory](https://github.com/apps/astro-factory)! - Fixes a crash when requesting `/index.html` against a dynamic page route like `[slug].astro` - [#​17841](withastro/astro#17841) [`c35448e`](withastro/astro@c35448e) Thanks [@​astro-factory](https://github.com/apps/astro-factory)! - Fixes SSR manifest containing stale `entryModules` references to prerender-only chunks that no longer exist in the final build output - [#​17847](withastro/astro#17847) [`eb87a23`](withastro/astro@eb87a23) Thanks [@​matthewp](https://github.com/matthewp)! - Fixes `set:text` escaping in MDX script and style elements </details> --- ### Configuration 📅 **Schedule**: (UTC) - Branch creation - At any time (no schedule defined) - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate CLI](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC41MS4yIiwidXBkYXRlZEluVmVyIjoiNDQuNTEuMiIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
When a hybrid build includes lazily imported modules used exclusively by prerendered pages, the shared
BuildInternals.entrySpecifierToBundleMapretains those specifiers after the prerender output is deleted. This causes the SSR manifest to reference chunk files that don't exist in the finaldist/server/ordist/client/output, resulting in missing resolver URLs at runtime.Fix
Following the established pattern from
stripPrerenderedRouteStyles()(PR #16517), this fix:prerenderOnlyEntrySpecifiersset toBuildInternalsto track specifiers written exclusively by the prerender build environment.plugin-internals.tsto populate that set during the prerendergenerateBundlephase.entryModulesduring SSR manifest injection inplugin-manifest.ts.This ensures every entry specifier in the SSR manifest resolves to a file that actually exists in the final server output.
Validation
Reporter @yumam0815 confirmed the fix eliminates all stale manifest references in their downstream validation:
Closes #17838