@astrojs/solid-js
5.1.0
Minor Changes
Node.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.
:warning: 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.
5.0.10
Patch Changes
- #13731
c3e80c2
Thanks @jsparkdev! - update vite to latest version for fixing CVE
5.0.9
Patch Changes
- #13591
5dd2d3f
Thanks @florian-lefebvre! - Removes unused code
5.0.8
Patch Changes
-
#13596
3752519
Thanks @jsparkdev! - update vite to latest version to fix CVE -
#13547
360cb91
Thanks @jsparkdev! - Updates vite to the latest version
5.0.7
Patch Changes
- #13526
ff9d69e
Thanks @jsparkdev! - updatevite
to the latest version
5.0.6
Patch Changes
- #13505
a98ae5b
Thanks @ematipico! - Updates the dependencyvite
to the latest.
5.0.5
Patch Changes
- #13323
80926fa
Thanks @ematipico! - Updatesesbuild
andvite
to the latest to avoid false positives audits warnings caused byesbuild
.
5.0.4
Patch Changes
5.0.3
Patch Changes
- #12887
ea603ae
Thanks @louisescher! - Adds a warning message when multiple JSX-based UI frameworks are being used without either theinclude
orexclude
property being set on the integration.
5.0.2
Patch Changes
5.0.1
Patch Changes
5.0.0
Major Changes
Minor Changes
Patch Changes
5.0.0-beta.1
Major Changes
Minor Changes
Patch Changes
4.4.4
Patch Changes
- #12481
8a46e80
Thanks @marbrex! - Resolvevite
peer dependency problem for strict package managers like Yarn in PnP mode.
4.4.3
Patch Changes
- #12364
9fc2ab8
Thanks @jdtjenkins! - Handles checking Svelte 5 component functions to avoid processing them as Solid components
4.4.2
Patch Changes
- #11998
082f450
Thanks @johannesspohr! - Fix view transition state persistence
4.4.1
Patch Changes
- #11624
7adb350
Thanks @bluwy! - Prevents throwing errors when checking if a component is a Solid component in runtime
4.4.0
Minor Changes
- #11234
4385bf7
Thanks @ematipico! - Adds a new function calledaddServerRenderer
to 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:
```ts 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); }; ```
4.3.0
Minor Changes
- #11144
803dd80
Thanks @ematipico! - The integration now exposes a function calledgetContainerRenderer
, that can be used inside the Container APIs to load the relative renderer.
```js 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');
}); ```
4.2.0
Minor Changes
- #10937
7179930
Thanks @florian-lefebvre! - Adds adevtools
option
You can enable the official Solid Devtools while working in development mode by setting devtools: true
in your solid()
integration config and adding solid-devtools
to your project dependencies:
bash
npm install solid-devtools
# yarn add solid-devtools
# pnpm add solid-devtools
```js import { defineConfig } from 'astro/config'; import solid from '@astrojs/solid-js';
export default defineConfig({ integrations: [solid({ devtools: true })], }); ```
4.1.0
Minor Changes
- #10689
683d51a5eecafbbfbfed3910a3f1fbf0b3531b99
Thanks @ematipico! - Deprecate support for versions of Node.js older thanv18.17.1
for Node.js 18, older thanv20.0.3
for Node.js 20, and the complete Node.js v19 release line.
This change is in line with Astro's Node.js support policy.
4.0.1
Patch Changes
- #9355
2e4d110a876efc4ddcdeda403259317d1cbb742d
Thanks @marvin-j97! - Upgradesvite-plugin-solid
to^2.8.0
4.0.0
Major Changes
- #6791
37021044dd4382a9b214f89b7c221bf1c93f3e7d
Thanks @patdx! - Render SolidJS components usingrenderToStringAsync
.
This changes the renderer of SolidJS components from renderToString
to renderToStringAsync
. It also injects the actual SolidJS hydration script generated by generateHydrationScript
, so that Suspense
, ErrorBoundary
and similar components can be hydrated correctly.
The server render phase will now wait for Suspense boundaries to resolve instead of always rendering the Suspense fallback.
If you use the APIs createResource
or lazy
, their functionalities will now be executed on the server side, not just the client side.
This increases the flexibility of the SolidJS integration. Server-side components can now safely fetch remote data, call async Astro server functions like getImage()
or load other components dynamically. Even server-only components that do not hydrate in the browser will benefit.
It is very unlikely that a server-only component would have used the Suspense feature until now, so this should not be a breaking change for server-only components.
This could be a breaking change for components that meet the following conditions:
- The component uses Suspense APIs like
Suspense
,lazy
orcreateResource
, and - The component is mounted using a hydrating directive:
client:load
client:idle
client:visible
client:media
These components will now first try to resolve the Suspense boundaries on the server side instead of the client side.
If you do not want Suspense boundaries to be resolved on the server (for example, if you are using createResource to do an HTTP fetch that relies on a browser-side cookie), you may consider:
- changing the template directive to
client:only
to skip server side rendering completely - use APIs like isServer or
onMount()
to detect server mode and render a server fallback without using Suspense.
3.0.3
Patch Changes
-
#9482
72b26daf694b213918f02d0fcbf90ab5b7ebc31f
Thanks @natemoo-re! - Improves compatibility with the Qwik adapter -
#9479
1baf0b0d3cbd0564954c2366a7278794fad6726e
Thanks @sarah11918! - Updates README
3.0.2
Patch Changes
- #8737
6f60da805
Thanks @ematipico! - Add provenance statement when publishing the library from CI
3.0.1
Patch Changes
- #8365
a525d5db1
Thanks @ryansolid! - Fix hydration in Solid renderer
3.0.0
Major Changes
-
#8188
d0679a666
Thanks @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. -
#7924
519a1c4e8
Thanks @matthewp! - Newinclude
andexclude
config options
The Solid integration now has new include
and exclude
config options. Use these if you want to use Solid alongside another JSX framework; include specifies files to be compiled for Solid and exclude
does the opposite.
Patch Changes
- #8264
1f58a7a1b
Thanks @natemoo-re! - Automatically unmount islands whenastro:unmount
is fired
3.0.0-rc.4
Patch Changes
- #8264
1f58a7a1b
Thanks @natemoo-re! - Automatically unmount islands whenastro:unmount
is fired
3.0.0-rc.3
Major Changes
3.0.0-beta.2
Patch Changes
- #8107
5b4b78245
Thanks @natemoo-re! - Updatebabel-preset-solid
dependency to^1.7.7
3.0.0-beta.1
Major Changes
The Solid integration now has new include
and exclude
config options. Use these if you want to use Solid alongside another JSX framework; include specifies files to be compiled for Solid and exclude
does the opposite.
3.0.0-beta.0
Major Changes
1eae2e3f7
Thanks @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.
2.2.1
Patch Changes
- #8107
5b4b78245
Thanks @natemoo-re! - Updatebabel-preset-solid
dependency to^1.7.7
2.2.0
Minor Changes
This 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:
astro
<Component>
<div>
<Component client:load>
<span>Nested</span>
</Component>
</div>
</Component>
Patch Changes
-
#7101
2994bc52d
Thanks @bluwy! - Always build edge/worker runtime with Vitewebworker
SSR target -
#7104
826e02890
Thanks @bluwy! - Specify"files"
field to only publish necessary files
2.1.1
Patch Changes
- #6934
b6797fc85
Thanks @matthewp! - Allow Solid ecosystem packages to not need special export map configuration. By default Solid is now treated as an external package in SSR, so any other dependent packages will receive the same instance.
2.1.0
Minor Changes
- #6213
afbbc4d5b
Thanks @Princesseuh! - Updated compilation settings to disable downlevelling for Node 14
2.0.2
Patch Changes
- #6104
8c80e78dd
Thanks @yasserhennawi! - Bump vitefu for peerDep warning with Vite 4
2.0.1
Patch Changes
2.0.0
Major Changes
- #5782
1f92d64ea
Thanks @Princesseuh! - Remove support for Node 14. Minimum supported Node version is now >=16.12.0
2.0.0-beta.0
See changes in 2.0.0-beta.0
### Major Changes - [#5782](https://github.com/withastro/astro/pull/5782) [`1f92d64ea`](https://github.com/withastro/astro/commit/1f92d64ea35c03fec43aff64eaf704dc5a9eb30a) Thanks [@Princesseuh](https://github.com/Princesseuh)! - Remove support for Node 14. Minimum supported Node version is now >=16.12.01.2.3
Patch Changes
1.2.2
Patch Changes
1.2.1
Patch Changes
1.2.0
Minor Changes
1.1.1
Patch Changes
- #4888
2dc582ac5
Thanks @AirBorne04! - adjusting the build settings for cloudflare (reverting back to platform browser over neutral) adjusting the ssr settings for solidjs (to build for node)
1.1.0
Minor Changes
1.0.0
Major Changes
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
!
0.4.1
Patch Changes
0.4.0
Minor Changes
- #3914
b48767985
Thanks @ran-dall! - Rollback supportednode@16
version. Minimum versions are nownode@14.20.0
ornode@16.14.0
.
0.3.1
Patch Changes
0.3.0
Minor Changes
- #3871
1cc5b7890
Thanks @natemoo-re! - Update supportednode
versions. Minimum versions are nownode@14.20.0
ornode@16.16.0
.
0.2.1
Patch Changes
-
#3854
b012ee55
Thanks @bholmesdev! - [astro add] Support adapters and third party packages -
515e8765
Thanks @FredKSchott! - Update peerDependencies to "solid@^1.4.3"
0.2.0
Minor Changes
- #3652
7373d61c
Thanks @natemoo-re! - Add support for passing named slots from.astro
=> framework components.
Each slot
is be passed as a top-level prop. For example:
```jsx
// From .astro
Hello world!
Dash
// For .jsx export default function Component({ title, slotWithDash, children }) { return ( <>
); } ```
0.1.4
Patch Changes
- #3505
2b35650b
Thanks @bholmesdev! - Fix newline characters in SolidJS JSX attributes (ex: multiline CSS classes)
0.1.3
Patch Changes
- #3455
e9a77d86
Thanks @natemoo-re! - Update client hydration to check forssr
attribute. Requiresastro@^1.0.0-beta.36
.
0.1.2
Patch Changes
- #3140
5e28b790
Thanks @hippotastic! - Fix location of SolidJS pre-hydration code
0.1.1
Patch Changes
815d62f1
Thanks @FredKSchott! - no changes.
0.1.0
Minor Changes
- #3003
13b782f4
Thanks @ryansolid! - Improve nested hydration with Solid
0.0.4-beta.0
Patch Changes
- #3003
13b782f4
Thanks @ryansolid! - Improve nested hydration with Solid
0.0.3
Patch Changes
- #2889
71c12b90
Thanks @zadeviggers! - Correct package name in README. Package is@astrojs/solid-js
, not@astrojs/solid
.
0.0.2
Patch Changes
-
#2885
6b004363
Thanks @bholmesdev! - Add README across Astro built-in integrations -
#2847
3b621f7a
Thanks @tony-sull! - Adds keywords to the official integrations to support discoverability on Astro's Integrations site
0.0.2-next.0
Patch Changes
- #2847
3b621f7a
Thanks @tony-sull! - Adds keywords to the official integrations to support discoverability on Astro's Integrations site