Closed rktyt closed 3 hours ago
It's possible you missed that part, but that's expected. We explain it right at the beginning of our docs: https://docs.astro.build/en/guides/middleware/#_top
@ematipico
Document says "all prerendered pages".
If the setting is output: 'server'
, it is on-demand, so it shouldn't be executed, right?
UPDATES: I understand if there is at least one prerendered page, but if there is none, why is it executed at build time?
Astro Info
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
In v4.16.13, the build passed without any errors, but in v4.16.14 the build started to fail. It looks like the build is "executing" the middleware code.
What's the expected result?
There are no errors in the build. The build is expected to only be transpiled.
Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-patrsd?file=src%2Fmiddleware%2Findex.ts
Please run
npm run build
.Participation