https://github.com/atomicojs/astro
https://github.com/atomicojs/astro
Last synced: 12 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/atomicojs/astro
- Owner: atomicojs
- Created: 2022-05-06T03:42:39.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2024-02-10T02:19:08.000Z (over 2 years ago)
- Last Synced: 2025-06-12T20:33:55.396Z (about 1 year ago)
- Language: JavaScript
- Size: 724 KB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# @atomico/astro
Early support for using Atomico SSR + Astro Build.
## Install
```bash
npm i -D @atomico/astro
```
## Usage
```js
import { defineConfig } from "astro/config";
import Atomico from "@atomico/astro";
export default defineConfig({
integrations: [Atomico()],
});
```
You must associate the flag to the astro scripts in package.json#script `--experimental-integrations`, example:
```json
{
"scripts": {
"dev": "astro dev --experimental-integrations",
"start": "astro dev --experimental-integrations",
"build": "astro build --experimental-integrations",
"preview": "astro preview --experimental-integrations"
}
}
```
## Hydration
Atomico applies an automatic hydration, if it is required to hydrate the component on the client, you must include the component script, example:
```
---
import "./my-component.js" // SSR
---
```