You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Astro v6.4.6
Node v24.14.0
System Linux (x64)
Package Manager pnpm
Output server
Adapter @astrojs/node
Integrations none
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
I'm trying to split my middlewares across multiple files, but HMR stops working for the files in src/middleware/. It works as expected for src/middleware.ts, but that also stops working if it is moved to src/middleware/index.ts.
Smells like a similar issue as the one with actions, unless I'm misinterpreting.
2026-06-10.23-59-13.mp4
What's the expected result?
Files in the src/middleware/ should also trigger HMR.
Astro Info
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
I'm trying to split my middlewares across multiple files, but HMR stops working for the files in
src/middleware/. It works as expected forsrc/middleware.ts, but that also stops working if it is moved tosrc/middleware/index.ts.Smells like a similar issue as the one with actions, unless I'm misinterpreting.
2026-06-10.23-59-13.mp4
What's the expected result?
Files in the
src/middleware/should also trigger HMR.Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-e7ndck5e?file=src%2Fmiddleware.ts
Participation