Open mef opened 3 weeks ago
Hey @mef thank you so much for this well detailed issue.
What if we add the extra step to update the manifest file ? I think this will solve the problem
maybe also worth exploring iterating through pages instead of routes https://github.com/codiume/orbit/issues/654#issuecomment-2379835208
A regression in v4.6.0 causes CSS files to 404 in the build for pages rendered in Astro's SSR mode.
The feature was working well in v4.5.0 and earlier version.
Side-note: this is a follow-up of a discussion started inside #660.
To Reproduce
server
orhybrid
in Astro config), and some CSS somewhere.npm run build
npm run preview
Expected behavior
All pages load with their CSS style correctly applied.
Observed behavior
The SSR-generated pages load with no style at all. The developer console shows error messages with CSS files not found (404).
Static pages have CSS applied as suitable.
Additional context
As of v4.5.0,
astro-purgecss
renames CSS files, and updates their references inside the pages consuming them.Cause of the regression has been identified:
dist/server/manifest_[hash].mjs
were also updated with reference to the renamed files.routes
variable of the Astro plugin hook are processed - hence only the paths corresponding to static HTML files.@the-dijkstra which approach would you like to take to fix this one?