コンテンツにスキップ

Upgrade to Astro v7

このコンテンツはまだ日本語訳がありません。

This guide will help you migrate from Astro v6 to Astro v7.

Need to upgrade an older project to v6 first? See our older migration guide.

Need to see the v6 docs? Visit this older version of the docs site (unmaintained v6 snapshot).

Update your project’s version of Astro to the latest version using your package manager:

Terminal window
# Upgrade Astro and official integrations together
npx @astrojs/upgrade alpha

You can also upgrade your Astro integrations manually if needed, and you may also need to upgrade other dependencies in your project.

Astro v7.0 includes potentially breaking changes, as well as the removal of some previously deprecated features.

If your project doesn’t work as expected after upgrading to v7.0, check this guide for an overview of all breaking changes and instructions on how to update your codebase.

See the Astro changelog for full release notes.

Astro v7.0 upgrades to Vite 8 as the development server and production bundler.

If you are using Vite-specific plugins, configuration, or APIs, check the Vite 8 migration guide for their breaking changes and upgrade your project as needed.

Most Astro users should be able to upgrade without any changes to their project code. This is primarily a breaking change for Astro integrations and plugins that depend on Vite internals.

The Rust-based Astro compiler, previously available as an experimental flag (experimental.rustCompiler), is now the default and only compiler in Astro 7. The Rust compiler delivers significantly faster build times compared to the previous Go-based compiler.

No action is required for most projects. The Rust compiler is a drop-in replacement for the Go-based compiler.

If you had previously opted in to the Rust compiler via the experimental flag, you can now remove it from your configuration:

astro.config.mjs
import { defineConfig } from 'astro/config';
export default defineConfig({
experimental: {
rustCompiler: true,
},
});

If you encounter any issues with the Rust compiler, please report them on GitHub.

貢献する コミュニティ スポンサー