0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2025-01-06 22:10:10 -05:00
This commit is contained in:
Jonathan Neal 2021-12-21 22:01:28 -05:00 committed by GitHub
parent e07c1cbd7e
commit 29976c6de0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 6 deletions

View file

@ -62,10 +62,11 @@ Astro renders every component on the server **at build time**, unless [client:on
import MyReactComponent from '../components/MyReactComponent.jsx';
---
<!-- "client:visible" means the component won't load any client-side
JavaScript for the component until it becomes visible in the
JavaScript for the component until it becomes visible in the
user's browser. -->
<MyReactComponent client:visible />
```
Note that the renderer JS (e.g. React) and the component's CSS are downloaded with the page. The `client:*` directives only dictate when the component JS is imported and when the component is hydrated.
### `<MyComponent client:load />`

View file

@ -2,10 +2,8 @@ import { imagetools } from 'vite-imagetools';
// @ts-check
export default /** @type {import('astro').AstroUserConfig} */ ({
renderers: [
"@astrojs/renderer-vue"
],
renderers: ['@astrojs/renderer-vue'],
vite: {
plugins: [imagetools()]
}
plugins: [imagetools()],
},
});