Updated
Published
Astro 4.0 Release
Astro 4.0 hits the ground running
Another month brings another release of Astro! Astro 4.0 has hit the ground running bringing new features and developer experience improvements.
Table of contents
- Astro Dev Toolbar
- Incremental Content Caching
- Internationalization
- And More!
- Upgrading to Astro 4.0
- Getting Started With Astro
- Further Resources
Astro Dev Toolbar
A huge boon for developer productivity, the Astro Dev Toolbar contains a plethora of different tools. By default the toolbar provides an inspect tool and an audit tool.
The Inspect tool allows you to better understand the islands in your pages. While the Audit tool runs several tests for accessibility issues.
The best feature of the dev toolbar is its extendability. There are official integrations with Sentry and Storyblok.
Astro developers have already started working with the dev toolbar API. You can find the fruits of their work on the Astro integration catalog.
Incremental Content Caching
Incremental content caching is an experimental feature designed to speed up the Astro build step. Astro accomplishes this by tracking changes in content collections and only rebuilding when necessary.
To enable this feature, turn on experimental.contentCollectionCache
in your
Astro config file.
Internationalization
Astro 4.0 now includes stable support for internationalization routing. This allows
developers to include different languages at different routes specified by language code
(for example: example.com/en
and example.com/es
).
For complete details on how to get started with internationalization in Astro routing, read the Astro Internationalization guide.
And More!
The latest Astro also brings updates to View Transitions. Initially introduced in Astro 3.0, view transitions are a slick way to move between pages with minimal JavaScript (if any!). Astro 4.0 brings view transitions to forms and adds configuration around prefetching pages.
Logging was another developer experience improvement that the latest version brings. Logs should now be shorter and more helpful.
Read the full Astro 4.0 release post, for all the juicy details.
Upgrading to Astro 4.0
There are not many breaking changes from Astro 3.0 to Astro 4.0. Mostly just around the integration API. Skim the Astro 4.0 upgrade guide to make sure nothing negatively affects your sites.
Getting Started With Astro
New to Astro? Astro 4.0 is a fantastic place to start. It’s as easy as:
npm create astro@latest
Then Huston (Astro’s mascot) will guide you through the setup process. Then get started with one of Astro’s tutorials.