We've been running our documentation with Astro for a few years now. We upgraded to NodeJS 22 a few weeks ago, and we noticed a flash of unstyled content between page transitions using the <ClientRouter />. When I start the dev server, the issue isn't present, but I've managed to reproduce the issue locally by switching from the Vercel adapter to the NodeJS one and running astro preview on a local build. I'm testing on Chromium (Arc). In order to troubleshoot the issue.
Changes that may have something to do with it:
- Upgraded NodeJS from 18 to 22
- Upgraded astro from 4.11 to 5.12
- Change scss
additionalData: '@import "./src/styles/variables.scss";'toadditionalData: '@use "./src/styles/variables.scss" as *;' - Changed from
mode: hybridtomode: static
I've tried:
- Removing any code related to theme control (dark/light mode)
- Setting
transition:animate="none"on the root - Upgrading Astro to 5.13.5
- Nuking node modules & yarn.lock and reinstalling dependencies
I haven't been able to isolate those changes since they are all interdependent and can't get the build working without them. I'm stuck, which is why I'm posting here. Any hint?
