Skip to content

Commit eff4e55

Browse files
committed
Fix exports
1 parent 187f550 commit eff4e55

File tree

8 files changed

+506
-45
lines changed

8 files changed

+506
-45
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Add `imagetools` plugin into your `vite.config.js`:
1616

1717
```js
1818
import { sveltekit } from '@sveltejs/kit/vite'
19-
import { imagetools } from '@zerodevx/svelte-img'
19+
import { imagetools } from '@zerodevx/svelte-img/vite'
2020

2121
/** @type {import('vite').UserConfig} */
2222
const config = {
@@ -35,13 +35,13 @@ Use anywhere in your Svelte app:
3535
<script>
3636
// Import original max-sized image with `?run` query param.
3737
import cat from '$lib/assets/cat.jpg?run'
38-
import { Img } from '@zerodevx/svelte-img'
38+
import Img from '@zerodevx/svelte-img'
3939
</script>
4040

4141
<Img class="any classes" src="{cat}" alt="Cute cat" />
4242
```
4343

44-
The `<Img>` tag renders into:
44+
The image component renders into:
4545

4646
```html
4747
<picture>
@@ -59,7 +59,7 @@ The `<Img>` tag renders into:
5959
srcset="path/to/jpg/480 480w, path/to/jpg/1024 1024w, path/to/jpg/1920 1920w"
6060
loading="lazy"
6161
decoding="async"
62-
style='background: url("data:image/webp;base64,UklGRmwAAABXRUJQVlA4IGAAAADwAQCdASoQAAwABUB8JbACdACVHAuzHEAA+FXw/vPuIDGE/UU8XBsY0aVUcxdGEcG5CngK2JQO7wxCmgwPJrlpw4REDWFeMX1yfLUHBxkTmnPYhBDAP1QyVOF7EB/AAAA=") no-repeat center/cover'
62+
style='background: url("data:image/webp;base64,XXX") no-repeat center/cover'
6363
alt="Cute cat"
6464
/>
6565
</picture>

0 commit comments

Comments
 (0)