Repository navigation
Fix SSR full reload failing to re-import astro:server-app with third-party Vite plugins - #17685
Merged
Merged
Conversation
…ization (#17684) Vite's ModuleGraph._resolveUrl() appends the resolved file extension to module URLs that don't start with `virtual:` or contain `\0`. This caused `astro:server-app` to become `astro:server-app.js` in the module graph, which then failed to resolve during SSR full reloads triggered by plugins like @tailwindcss/vite. Rename the virtual module ID from `astro:server-app` to `virtual:astro:server-app` to match the convention already used by `virtual:astro:app`.
1 task done
Merging this PR will improve performance by 20.14%
|
| Mode | Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|---|
| ⚡ | Simulation | Build: hybrid site (static + server) |
1.6 s | 1.4 s | +20.14% |
Tip
Curious why this is faster? Comment @codspeedbot explain why this is faster on this PR, or directly use the CodSpeed MCP with your agent.
Comparing triagebot/fix-17684 (d8dd7c3) with main (2066f39)
🦋 Changeset detectedLatest commit: d8dd7c3 The changes in this PR will be included in the next version bump. This PR includes changesets to release 418 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 |
matthewp
approved these changes
Aug 14, 2026
Merged
haydenbleasel
added a commit
to haydenbleasel/blume
that referenced
this pull request
Aug 20, 2026
Astro 7.2.3 (withastro/astro#17685) renamed the dev SSR entry to virtual:astro:server-app, so Vite full reloads no longer re-request it with a spurious .js suffix — the failure serverAppResolvePlugin existed to absorb (route-set changes corrupting the SSR module runner, renamed pages 404ing until a manual restart). With the floor at ^7.2.3 the shim can never match anything, so it's removed along with its export, its slot in the generated Vite config, and its tests. Verified against apps/docs on Astro 7.2.4 with the shim gone: a live dev-server content add and rename both serve their new routes with the old route 404ing, no "Failed to load url" errors, no restart.
dadezzz
pushed a commit
to dadezzz/university_notes
that referenced
this pull request
Aug 22, 2026
This PR contains the following updates: | Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) | |---|---|---|---| | [@astrojs/markdown-remark](https://astro.build) ([source](https://github.com/withastro/astro/tree/HEAD/packages/markdown/remark)) | [`7.2.2` → `7.2.3`](https://renovatebot.com/diffs/npm/@astrojs%2fmarkdown-remark/7.2.2/7.2.3) |  |  | | [astro](https://astro.build) ([source](https://github.com/withastro/astro/tree/HEAD/packages/astro)) | [`7.2.2` → `7.2.3`](https://renovatebot.com/diffs/npm/astro/7.2.2/7.2.3) |  |  | --- ### Release Notes <details> <summary>withastro/astro (@​astrojs/markdown-remark)</summary> ### [`v7.2.3`](https://github.com/withastro/astro/blob/HEAD/packages/markdown/remark/CHANGELOG.md#723) [Compare Source](https://github.com/withastro/astro/compare/@astrojs/[email protected]...@astrojs/[email protected]) ##### Patch Changes - Updated dependencies \[[`8c193f6`](withastro/astro@8c193f6)]: - [@​astrojs/internal-helpers](https://github.com/astrojs/internal-helpers)@​0.10.3 </details> <details> <summary>withastro/astro (astro)</summary> ### [`v7.2.3`](https://github.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#723) [Compare Source](https://github.com/withastro/astro/compare/[email protected]@7.2.3) ##### Patch Changes - [#​17724](withastro/astro#17724) [`97140b2`](withastro/astro@97140b2) Thanks [@​ematipico](https://github.com/ematipico)! - Fixes an issue where Astro could run out of memory when `experimental.collectionStorage` is set to `chunked` and there are multiple concurrent updates to the same collection. - [#​17636](withastro/astro#17636) [`51723b1`](withastro/astro@51723b1) Thanks [@​matthewp](https://github.com/matthewp)! - Fixes the dev server sometimes matching against stale routes after pages were added, removed, or renamed, requiring a dev server restart to pick up the change - [#​17636](withastro/astro#17636) [`51723b1`](withastro/astro@51723b1) Thanks [@​matthewp](https://github.com/matthewp)! - Fixes the composable request helpers (`astro/fetch`) throwing an error when used on a request that had been rewritten with `Astro.rewrite()` or `next()` - [#​17636](withastro/astro#17636) [`51723b1`](withastro/astro@51723b1) Thanks [@​matthewp](https://github.com/matthewp)! - Refactors Astro's internal server-side request handling. This is an internal change: all documented public APIs, including `App` and `NodeApp`, keep their existing signatures and behavior. The undocumented internal `app.pipeline` property and the `AppPipeline` export from `astro/app` have been removed. Adapters that used `app.pipeline.getLogger()` to wait for the configured log destination can call the new `app.getLogger()` instead. As a result of this refactor, `new FetchState(request)` from `astro/fetch` now works anywhere inside a built Astro server — including custom `src/fetch.ts` entrypoints — without the request needing to first pass through `app.render()`. Previously this threw an error, breaking patterns like the Cloudflare adapter's advanced custom-worker setup. - [#​17723](withastro/astro#17723) [`c3b9aed`](withastro/astro@c3b9aed) Thanks [@​florian-lefebvre](https://github.com/florian-lefebvre)! - Fixes a link in font providers JSDoc annotations - [#​17699](withastro/astro#17699) [`e28d227`](withastro/astro@e28d227) Thanks [@​ArmandPhilippot](https://github.com/ArmandPhilippot)! - Fixes several documentation issues related to the JSDoc for configuration options. - When hovering over the `server` and `fonts` options, the JSDoc for the nested options was displayed instead of the JSDoc for the top-level property. - Two i18n configuration options were being used incorrectly in the examples. - The indentation of some code blocks was broken on hover. - [#​17572](withastro/astro#17572) [`2066f39`](withastro/astro@2066f39) Thanks [@​matthewp](https://github.com/matthewp)! - Fixes a crash when a request arrives with a malformed port in the `Host` header (for example `example.com:65536` or `example.com:8080:8080`). Such a host made the constructed request URL invalid, and the fallback that was meant to recover reused the same invalid host and threw again. The request URL now degrades to a host the server controls when the incoming host cannot be parsed, so the request is handled instead of erroring. - [#​17685](withastro/astro#17685) [`9f15609`](withastro/astro@9f15609) Thanks [@​astrobot-houston](https://github.com/astrobot-houston)! - Fixes a dev server error where an SSR full reload triggered by a third-party Vite plugin (such as `@tailwindcss/vite`) could fail with `Failed to load url astro:server-app.js` - [#​17636](withastro/astro#17636) [`51723b1`](withastro/astro@51723b1) Thanks [@​matthewp](https://github.com/matthewp)! - Improves error handling for custom log destinations. When the configured logger fails to load, Astro now reports the error and continues with the default console logger instead of failing the first request. - [#​17631](withastro/astro#17631) [`cf29bec`](withastro/astro@cf29bec) Thanks [@​matthewp](https://github.com/matthewp)! - Fixes `getCollection()` and `getEntry()` throwing `DataCloneError` when a collection schema transform returns a `Temporal.PlainDate` or other class instance. - Updated dependencies \[[`8c193f6`](withastro/astro@8c193f6)]: - [@​astrojs/internal-helpers](https://github.com/astrojs/internal-helpers)@​0.10.3 - [@​astrojs/markdown-remark](https://github.com/astrojs/markdown-remark)@​7.2.3 - [@​astrojs/markdown-satteri](https://github.com/astrojs/markdown-satteri)@​0.3.6 </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 these updates 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:eyJjcmVhdGVkSW5WZXIiOiI0NC4zMS4wIiwidXBkYXRlZEluVmVyIjoiNDQuMzEuMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->
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.
Closes #17684
Changes
ASTRO_DEV_SERVER_APP_IDwithvirtual:(changing it fromastro:server-apptovirtual:astro:server-app), matching the convention already used by the siblingvirtual:astro:appmodule in the same file. Vite'sModuleGraph._resolveUrl()skips URL normalization for IDs that start withvirtual:— without this prefix, Vite appended.jsto the stored URL, so full-reload attempts viarunner.import("astro:server-app.js")failed to match Astro'sresolveIdfilter.Failed to load url astro:server-app.jsthat appeared when a third-party Vite plugin (e.g.@tailwindcss/vite) triggered an SSR full reload on a non-page file.Testing
@tailwindcss/vitetriggering an SSR full reload, which is outside the current unit/integration test infrastructure.src/content/test.mdnow produces[vite] program reloadwithout theastro:server-app.jserror, and the server continues serving successfully. Confirmed by the issue reporter (@mavam).Docs
No docs update needed — this is an internal virtual module ID fix with no user-facing API change.