The minimum supported Node.js version is now 22.22.0, the latest Node.js 22 release supported by StackBlitz. This change is in line with Astroโs Node.js support policy.
#17951e5b0ac4 Thanks @hanford! - Migrates the React integration to @vitejs/plugin-react v6, using Oxc for JSX and Fast Refresh. Removes the babel integration option; projects with custom Babel transforms must configure @rolldown/plugin-babel under vite.plugins instead.
Adds an opt-in compiler option for the Oxc-based React Compiler. Install oxc-transform-react and enable it in your Astro config:
import react from'@astrojs/react';
exportdefault {
integrations: [react({ compiler: true })],
};
The compiler memoizes client components and hooks. Server rendering is not compiled. The target defaults to the installed React major version; React 17 and 18 projects also need react-compiler-runtime installed. Pass an options object to configure the compiler, for example compiler: { compilationMode: 'annotation' }. The integrationโs include and exclude options apply, and dependencies and Astro files are excluded.
The integration uses @vitejs/plugin-react v6 and Oxc for JSX and Fast Refresh. The babel integration option has been removed in this major release.
If you use custom Babel transforms, install @rolldown/plugin-babel and @babel/core, keeping your existing Babel plugins and presets installed:
Terminal window
pnpmadd-D@rolldown/plugin-babel@babel/core
Move your Babel plugins and presets from react({ babel: ... }) to babel() in vite.plugins. For example, migrate a project using babel-plugin-styled-components from:
This also works with react({ compiler: true }). Babel runs before Oxc transforms TypeScript and JSX. The Babel plugin automatically enables parsing for .jsx, .ts, and .tsx files. It does not load babel.config.js or .babelrc files; pass the options directly to babel(). The old babel callback is not supported; use the pluginโs overrides and preset hooks for conditional transforms.
Do not enable babel-plugin-react-compiler on the same components as the Oxc compiler.
#179857a6e7f7 Thanks @astro-factory! - Fixes Vue render-function components failing to build when @astrojs/react is also enabled. Reactโs renderer check no longer crashes on non-React object components, and Vueโs check now recognizes defineComponent() components that use a setup function returning a render function.
A new container-renderer entrypoint exporting getContainerRenderer() has been added to the following integrations: React, Preact, Svelte, SolidJS, Vue, and MDX. This prevents bundlers from trying to bundle unrelated exports from the package root when only the Container API is used.
If you are using the Container API, update your import statements to use the new entrypoint. The following example updates the getContainerRenderer() import for React:
import { getContainerRenderer } from '@astrojs/react';
import { getContainerRenderer } from '@astrojs/react/container-renderer';
Importing getContainerRenderer() from the package root still works, but is now deprecated and logs a warning.
๐ Patch Changes
#17027241250b Thanks @ocavue! - Triggers beta prereleases for packages that are still on alpha
A new container-renderer entrypoint exporting getContainerRenderer() has been added to the following integrations: React, Preact, Svelte, SolidJS, Vue, and MDX. This prevents bundlers from trying to bundle unrelated exports from the package root when only the Container API is used.
If you are using the Container API, update your import statements to use the new entrypoint. The following example updates the getContainerRenderer() import for React:
import { getContainerRenderer } from '@astrojs/react';
import { getContainerRenderer } from '@astrojs/react/container-renderer';
Importing getContainerRenderer() from the package root still works, but is now deprecated and logs a warning.
#16224a2b9eeb Thanks @fkatsuhiro! - Fix React 19 โFloatโ mechanism injecting into Astro islands instead of the . This PR adds a filter to @astrojs/react to strip these auto-generated resource from the islandโs HTML output, ensuring valid HTML structure.