Skip to content

Bump Astro from 5 to 6#42222

Merged
mdo merged 6 commits intov6-devfrom
v6-dev-bump-astro-to-v6
Mar 21, 2026
Merged

Bump Astro from 5 to 6#42222
mdo merged 6 commits intov6-devfrom
v6-dev-bump-astro-to-v6

Conversation

@julien-deramond
Copy link
Member

@julien-deramond julien-deramond commented Mar 21, 2026

Local run

npm run start

Note

I had to change the way Scss.astro worked because the CSS was only loaded by the first page. Navigating to other pages didn't preserve the loaded CSS in the <head>. I don't know if this is an issue in Astro v6, but the new approach with the extra docs-dev.scss looks rather well too.

Local release build

npm run release
npm run docs

Then go to _site and run a local server, like http-server.

Netlify deployment

Our Netlify app must be configured with Node 20, which is not supported anymore by Astro

9:32:28 AM: > bootstrap@6.0.0-alpha1 astro-build
9:32:28 AM: > astro build --root site && rm -rf _site && cp -r site/dist _site
9:32:28 AM: Node.js v20.20.1 is not supported by Astro!
9:32:28 AM: Please upgrade Node.js to a supported version: ">=22.12.0"

Not having the rights for the Netfliy config for Bootstrap, I ended up adding a .nvmrc file at the root of the project, that overrides the version set up in Netlify configuration.

In the end, I would keep this .nvmrc because it's really handy for contributors navigating between different projects to know which version of Node (+ npm) is actually used to build the project.

Node 24

Since I needed to define a version in the .nvmrc, I chose to use the latest LTS Node version, which is 24.14.0 (LTS); and bumped the version used in GitHub Actions files as well.

Verification

@julien-deramond julien-deramond force-pushed the v6-dev-bump-astro-to-v6 branch from 0df3533 to 810879f Compare March 21, 2026 10:38
@julien-deramond julien-deramond marked this pull request as ready for review March 21, 2026 10:41
@julien-deramond julien-deramond requested a review from a team as a code owner March 21, 2026 10:41
@julien-deramond julien-deramond requested a review from mdo March 21, 2026 10:42
@julien-deramond
Copy link
Member Author

I think the migration is in good shape now. @mdo, could you take some time to go through all the use cases with me to make sure everything behaves as expected (i.e., the same as before)?

In particular:

  • local dev with dynamic rendering when modifying Sass files (from the docs and/or Bootstrap)
  • Netlify
  • release simulation (what gets copied into gh-pages)
  • standard pages as well as redirects

And anything else you think might be worth checking 🙏

@mdo mdo merged commit d02c4c4 into v6-dev Mar 21, 2026
12 checks passed
@mdo mdo deleted the v6-dev-bump-astro-to-v6 branch March 21, 2026 20:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Inbox

Development

Successfully merging this pull request may close these issues.

2 participants