You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Updated according to new configuration
Astro imports the `defineConfig` function from `astro/config`. The `integrations` key needs to be passed into the `defineConfig` function, but it is not shown in the README. Updated the README according to the CLI example.
* update alpine
* update image
* update lit
* update mdx
* update preact
* update prefetch
* update react
* update sitemap
* update solid
* update svelte
* update tailwind
* update turbolinks
* update vue
* chore: add changeset
* update image
* update svelte readme
Co-authored-by: Nate Moore <nate@astro.build>
Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
Copy file name to clipboardExpand all lines: packages/integrations/image/README.md
+25-13Lines changed: 25 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -63,13 +63,14 @@ Then, apply this integration to your `astro.config.*` file using the `integratio
63
63
64
64
__`astro.config.mjs`__
65
65
66
-
```js
66
+
```js ins={2} "image()"
67
+
import { defineConfig } from'astro/config';
67
68
importimagefrom'@astrojs/image';
68
69
69
-
exportdefault {
70
+
exportdefaultdefineConfig({
70
71
// ...
71
72
integrations: [image()],
72
-
}
73
+
});
73
74
```
74
75
75
76
### Installing `sharp` (optional)
@@ -82,16 +83,18 @@ npm install sharp
82
83
83
84
Then, update the integration in your `astro.config.*` file to use the built-in `sharp` image transformer.
84
85
85
-
```js ins={2,7}
86
-
// astro.config.mjs
86
+
__`astro.config.mjs`__
87
+
88
+
```js ins={3,8}
89
+
import { defineConfig } from'astro/config';
87
90
importimagefrom'@astrojs/image';
88
91
89
-
exportdefault {
92
+
exportdefaultdefineConfig({
90
93
// ...
91
94
integrations: [image({
92
95
serviceEntryPoint:'@astrojs/image/sharp'
93
96
})],
94
-
}
97
+
})
95
98
```
96
99
97
100
### Update `env.d.ts`
@@ -446,33 +449,37 @@ The integration can be configured to run with a different image service, either
446
449
447
450
The `serviceEntryPoint` should resolve to the image service installed from NPM. The default entry point is `@astrojs/image/squoosh`, which resolves to the entry point exported from this integration's `package.json`.
448
451
452
+
__`astro.config.mjs`__
453
+
449
454
```js
450
-
//astro.config.mjs
455
+
import { defineConfig } from'astro/config';
451
456
importimagefrom'@astrojs/image';
452
457
453
-
exportdefault {
458
+
exportdefaultdefineConfig({
454
459
integrations: [image({
455
460
// Example: The entrypoint for a third-party image service installed from NPM
456
461
serviceEntryPoint:'my-image-service/astro.js'
457
462
})],
458
-
}
463
+
});
459
464
```
460
465
461
466
### config.logLevel
462
467
463
468
The `logLevel` controls can be used to control how much detail is logged by the integration during builds. This may be useful to track down a specific image or transformation that is taking a long time to build.
0 commit comments