- #16180
1d1448cThanks @matthewp! - Pre-optimizes@preact/signalsandpreact/hooksin the Vite dep optimizer to prevent late discovery triggering full page reloads during dev
-
#15862
06fba3aThanks @crutchcorn! - Adds support for passing a Babel config to the Preact Vite Plugin:// astro.config.mjs import { defineConfig } from 'astro/config'; import preact from '@astrojs/preact'; export default defineConfig({ integrations: [ preact({ babel: { generatorOpts: { importAttributesKeyword: 'with', }, }, }), ], });
- #15864
d3c7de9Thanks @florian-lefebvre! - Removes temporary support for Node >=20.19.1 because Stackblitz now uses Node 22 by default
- #15881
de2860cThanks @matthewp! - FixuseId()collisions across multiple Astro islands by seeding a unique per-island root mask for Preact SSR and hydration.
-
#14427
e131261Thanks @florian-lefebvre! - Increases minimum Node.js version to 22.12.0 - (v6 upgrade guidance) -
#14445
ecb0b98Thanks @florian-lefebvre! - Astro v6.0 upgrades to Vite v7.0 as the development server and production bundler - (v6 upgrade guidance)
-
#15619
bbfa7c8Thanks @rururux! - Fixed an issue where the Preact integration would incorrectly intercept React 19 components, triggering "Invalid hook call" error logs. -
#15383
876b664Thanks @matthewp! - Fixes Preact components failing to render when using the Cloudflare adapter in dev mode. -
#15264
11efb05Thanks @florian-lefebvre! - Lower the Node version requirement to allow running on Stackblitz until it supports v22 -
#15700
4e7f3e8Thanks @ocavue! - Improves how Preact components are identified when setting theincludeand/orexcludeoptions in projects where multiple JSX frameworks are used together -
Updated dependencies [
4ebc1e3,4e7f3e8,a164c77,cf6ea6b,a18d727,240c317,745e632]:- @astrojs/internal-helpers@0.8.0
-
#15700
4e7f3e8Thanks @ocavue! - Improves how Preact components are identified when setting theincludeand/orexcludeoptions in projects where multiple JSX frameworks are used together -
Updated dependencies [
4ebc1e3,4e7f3e8]:- @astrojs/internal-helpers@0.8.0-beta.3
- #15619
bbfa7c8Thanks @rururux! - Fixed an issue where the Preact integration would incorrectly intercept React 19 components, triggering "Invalid hook call" error logs.
- #15383
876b664Thanks @matthewp! - Fixes Preact components failing to render when using the Cloudflare adapter in dev mode.
- #15264
11efb05Thanks @florian-lefebvre! - Lower the Node version requirement to allow running on Stackblitz until it supports v22
-
#14427
e131261Thanks @florian-lefebvre! - Increases minimum Node.js version to 22.12.0 - (v6 upgrade guidance) -
#14445
ecb0b98Thanks @florian-lefebvre! - Astro v6.0 upgrades to Vite v7.0 as the development server and production bundler - (v6 upgrade guidance)
-
#14715
3d55c5dThanks @ascorbic! - Adds support for client hydration ingetContainerRenderer()The
getContainerRenderer()function is exported by Astro framework integrations to simplify the process of rendering framework components when using the experimental Container API inside a Vite or Vitest environment. This update adds the client hydration entrypoint to the returned object, enabling client-side interactivity for components rendered using this function. Previously this required users to manually callcontainer.addClientRenderer()with the appropriate client renderer entrypoint.See the
container-with-vitestdemo for a usage example, and the Container API documentation for more information on using framework components with the experimental Container API.
- #14621
e3175d9Thanks @GameRoMan! - Updatesviteversion to fix CVE
- #14326
c24a8f4Thanks @jsparkdev! - Updatesviteversion to fix CVE
-
#13809
3c3b492Thanks @ascorbic! - Increases minimum Node.js version to 18.20.8Node.js 18 has now reached end-of-life and should not be used. For now, Astro will continue to support Node.js 18.20.8, which is the final LTS release of Node.js 18, as well as Node.js 20 and Node.js 22 or later. We will drop support for Node.js 18 in a future release, so we recommend upgrading to Node.js 22 as soon as possible. See Astro's Node.js support policy for more details.
⚠️ Important note for users of Cloudflare Pages: The current build image for Cloudflare Pages uses Node.js 18.17.1 by default, which is no longer supported by Astro. If you are using Cloudflare Pages you should override the default Node.js version to Node.js 22. This does not affect users of Cloudflare Workers, which uses Node.js 22 by default.
- #13731
c3e80c2Thanks @jsparkdev! - update vite to latest version for fixing CVE
- #13591
5dd2d3fThanks @florian-lefebvre! - Removes unused code
-
#13596
3752519Thanks @jsparkdev! - update vite to latest version to fix CVE -
#13547
360cb91Thanks @jsparkdev! - Updates vite to the latest version
- #13526
ff9d69eThanks @jsparkdev! - updateviteto the latest version
- #13505
a98ae5bThanks @ematipico! - Updates the dependencyviteto the latest.
- #13323
80926faThanks @ematipico! - Updatesesbuildandviteto the latest to avoid false positives audits warnings caused byesbuild.
- #12887
ea603aeThanks @louisescher! - Adds a warning message when multiple JSX-based UI frameworks are being used without either theincludeorexcludeproperty being set on the integration.
- #12481
8a46e80Thanks @marbrex! - Resolvevitepeer dependency problem for strict package managers like Yarn in PnP mode.
- #11930
4a44e82Thanks @lukasbachlechner! - Preact components no longer throw an error if a property is null.
- #11834
5f2536bThanks @ph1p! - Preact signals are now serialized correctly in arrays when they are given to components.
- #11464
2cdb685Thanks @rschristian! - Swap outpreact-ssr-prepassforrenderToStringAsyncfrompreact-render-to-string
-
#11234
4385bf7Thanks @ematipico! - Adds a new function calledaddServerRendererto the Container API. Use this function to manually store renderers inside the instance of your container.This new function should be preferred when using the Container API in environments like on-demand pages:
import type { APIRoute } from 'astro'; import { experimental_AstroContainer } from 'astro/container'; import reactRenderer from '@astrojs/react/server.js'; import vueRenderer from '@astrojs/vue/server.js'; import ReactComponent from '../components/button.jsx'; import VueComponent from '../components/button.vue'; // MDX runtime is contained inside the Astro core import mdxRenderer from 'astro/jsx/server.js'; // In case you need to import a custom renderer import customRenderer from '../renderers/customRenderer.js'; export const GET: APIRoute = async (ctx) => { const container = await experimental_AstroContainer.create(); container.addServerRenderer({ renderer: reactRenderer }); container.addServerRenderer({ renderer: vueRenderer }); container.addServerRenderer({ renderer: customRenderer }); // You can pass a custom name too container.addServerRenderer({ name: 'customRenderer', renderer: customRenderer, }); const vueComponent = await container.renderToString(VueComponent); return await container.renderToResponse(Component); };
-
#11144
803dd80Thanks @ematipico! - The integration now exposes a function calledgetContainerRenderer, that can be used inside the Container APIs to load the relative renderer.import { experimental_AstroContainer as AstroContainer } from 'astro/container'; import ReactWrapper from '../src/components/ReactWrapper.astro'; import { loadRenderers } from 'astro:container'; import { getContainerRenderer } from '@astrojs/react'; test('ReactWrapper with react renderer', async () => { const renderers = await loadRenderers([getContainerRenderer()]); const container = await AstroContainer.create({ renderers, }); const result = await container.renderToString(ReactWrapper); expect(result).toContain('Counter'); expect(result).toContain('Count: <!-- -->5'); });
-
#10938
fd508a0Thanks @florian-lefebvre! - Adds adevtoolsoptionYou can enable Preact devtools in development by setting
devtools: truein yourpreact()integration config:import { defineConfig } from 'astro/config'; import preact from '@astrojs/preact'; export default defineConfig({ integrations: [preact({ devtools: true })], });
-
#10689
683d51a5eecafbbfbfed3910a3f1fbf0b3531b99Thanks @ematipico! - Deprecate support for versions of Node.js older thanv18.17.1for Node.js 18, older thanv20.0.3for Node.js 20, and the complete Node.js v19 release line.This change is in line with Astro's Node.js support policy.
- #10585
ad50784adc6f262fc563999e97df3a5dc9087c88Thanks @rschristian! - Fixes (theoretical) edge case in Preact integration's JSX aliases
- #10200
c692d0c66a5062937e47402dc700d41c2a5dfc5cThanks @Princesseuh! - Fixes passing children to server-rendered components causing an error
-
#9524
0903ef90494e9c8bd0272347a0cdd51eca7f4648Thanks @aleksandrjet! - Allows rendering lazy components.You can now use lazy components with Suspense:
import { lazy, Suspense } from 'preact/compat'; const HeavyComponent = lazy(() => import('./HeavyComponent')); const Component = () => { return ( <Suspense fallback={<p>Loading...</p>}> <HeavyComponent foo="bar" /> </Suspense> ); };
-
#9482
72b26daf694b213918f02d0fcbf90ab5b7ebc31fThanks @natemoo-re! - Improves compatibility with the Qwik adapter -
#9479
1baf0b0d3cbd0564954c2366a7278794fad6726eThanks @sarah11918! - Updates README
- #8737
6f60da805Thanks @ematipico! - Add provenance statement when publishing the library from CI
-
#8188
d0679a666Thanks @ematipico! - Remove support for Node 16. The lowest supported version by Astro and all integrations is now v18.14.1. As a reminder, Node 16 will be deprecated on the 11th September 2023. -
#8179
6011d52d3Thanks @matthewp! - Astro 3.0 Release Candidate -
#7924
519a1c4e8Thanks @matthewp! - Newincludeandexcludeconfig optionsThe Preact integration now has new
includeandexcludeconfig options. Use these if you want to use Preact alongside another JSX framework; include specifies files to be compiled for Preact andexcludedoes the opposite.
- #8264
1f58a7a1bThanks @natemoo-re! - Automatically unmount islands whenastro:unmountis fired
- #8264
1f58a7a1bThanks @natemoo-re! - Automatically unmount islands whenastro:unmountis fired
-
#7924
519a1c4e8Thanks @matthewp! - Newincludeandexcludeconfig optionsThe Preact integration now has new
includeandexcludeconfig options. Use these if you want to use Preact alongside another JSX framework; include specifies files to be compiled for Preact andexcludedoes the opposite.
1eae2e3f7Thanks @Princesseuh! - Remove support for Node 16. The lowest supported version by Astro and all integrations is now v18.14.1. As a reminder, Node 16 will be deprecated on the 11th September 2023.
- #8007
58b121d42Thanks @paperdave! - Support Bun by adjusting how@babel/plugin-transform-react-jsxis imported.
-
#7093
3d525efc9Thanks @matthewp! - Prevent removal of nested slots within islandsThis change introduces a new flag that renderers can add called
supportsAstroStaticSlot. What this does is let Astro know that the render is sending<astro-static-slot>as placeholder values for static (non-hydrated) slots which Astro will then remove.This change is completely backwards compatible, but fixes bugs caused by combining ssr-only and client-side framework components like so:
<Component> <div> <Component client:load> <span>Nested</span> </Component> </div> </Component>
- #6213
afbbc4d5bThanks @Princesseuh! - Updated compilation settings to disable downlevelling for Node 14
- #5782
1f92d64eaThanks @Princesseuh! - Remove support for Node 14. Minimum supported Node version is now >=16.12.0
See changes in 2.0.0-beta.0
- #5782
1f92d64eaThanks @Princesseuh! - Remove support for Node 14. Minimum supported Node version is now >=16.12.0
-
#5015
b1964e9e1Thanks @matthewp! - Shared state in Preact components with signalsThis makes it possible to share client state between Preact islands via signals.
For example, you can create a signals in an Astro component and then pass it to multiple islands:
--- // Component Imports import Counter from '../components/Counter'; import { signal } from '@preact/signals'; const count = signal(0); --- <Count count={count} /> <Count count={count} />
- #4842
812658ad2Thanks @bluwy! - Add missing dependencies, support strict dependency installation (e.g. pnpm)
- #4515
999250d65Thanks @marvinhagemeister! - Automatically set up Preact DevTools bridge when runningastro dev.
-
04ad44563- > Astro v1.0 is out! Read the official announcement post.No breaking changes. This package is now officially stable and compatible with
astro@1.0.0!
- #3914
b48767985Thanks @ran-dall! - Rollback supportednode@16version. Minimum versions are nownode@14.20.0ornode@16.14.0.
- #3871
1cc5b7890Thanks @natemoo-re! - Update supportednodeversions. Minimum versions are nownode@14.20.0ornode@16.16.0.
- #3854
b012ee55Thanks @bholmesdev! - [astro add] Support adapters and third party packages
- #3769
b934ab5dThanks @hippotastic! - Fix "Invalid hook call" warning
-
#3712
e3fdc9b4Thanks @delucis! - Add support for enablingpreact/compatto Preact rendererTo use
preact/compatto render React components, users can now setcompattotruewhen using the Preact integration:integrations: [ preact({ compat: true }), ],
-
#3652
7373d61cThanks @natemoo-re! - Add support for passing named slots from.astro=> framework components.Each
slotis be passed as a top-level prop. For example:// From .astro <Component> <h2 slot="title">Hello world!</h2> <h2 slot="slot-with-dash">Dash</h2> <div>Default</div> </Component>; // For .jsx export default function Component({ title, slotWithDash, children }) { return ( <> <div id="title">{title}</div> <div id="slot-with-dash">{slotWithDash}</div> <div id="main">{children}</div> </> ); }
- #3455
e9a77d86Thanks @natemoo-re! - Update client hydration to check forssrattribute. Requiresastro@^1.0.0-beta.36.
- #3166
70263cf7Thanks @natemoo-re! - Fix integration to use updateConfig rather than returning a partial config object
815d62f1Thanks @FredKSchott! - no changes.
- #2979
9d7a4b59Thanks @FredKSchott! - Welcome to the Astro v1.0.0 Beta! Read the official announcement for more details.
- #2885
6b004363Thanks @bholmesdev! - Add README across Astro built-in integrations
- #2847
3b621f7aThanks @tony-sull! - Adds keywords to the official integrations to support discoverability on Astro's Integrations site
- #2872
098f6f6bThanks @bholmesdev! - FixisSelfAcceptingerrors when using the Preact integration with the Astro dev server
- #2872
098f6f6bThanks @bholmesdev! - FixisSelfAcceptingerrors when using the Preact integration with the Astro dev server
- #2847
3b621f7aThanks @tony-sull! - Adds keywords to the official integrations to support discoverability on Astro's Integrations site