Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/bundler-utils/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,4 @@ You probably need [@srcset/loader](https://npmjs.com/package/@srcset/loader) or

## Documentation

For more details, guides and API references, check out the [documentation website](https://srcset.js.org/api/bundler-utils/).
For more details, guides and API references, check out the [documentation website](https://srcset.js.org).
13 changes: 9 additions & 4 deletions packages/loader/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,18 @@

```bash
# pnpm
pnpm add -D @srcset/loader @srcset/runtime
pnpm add -D @srcset/loader
pnpm add @srcset/runtime
# yarn
yarn add -D @srcset/loader @srcset/runtime
yarn add -D @srcset/loader
yarn add @srcset/runtime
# npm
npm i -D @srcset/loader @srcset/runtime
npm i -D @srcset/loader
npm i @srcset/runtime
```

`@srcset/runtime` is a peer dependency that ships to the browser, so it goes into the regular dependencies while the loader stays a dev one.

## Usage

```js
Expand All @@ -60,7 +65,7 @@ export default {
loader: '@srcset/loader',
options: {
rules: [
// First format is the fallback: default export and src
// Keep jpg in the list: it is what a browser without webp or avif gets
{
width: [1, 0.5],
format: ['jpg', 'webp', 'avif']
Expand Down
2 changes: 1 addition & 1 deletion packages/preact/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,4 @@ function Hero() {

## Documentation

For more details, guides and API references, check out the [documentation website](https://srcset.js.org/components/preact/).
For more details, guides and API references, check out the [documentation website](https://srcset.js.org/components/).
2 changes: 1 addition & 1 deletion packages/react/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,4 @@ function Hero() {

## Documentation

For more details, guides and API references, check out the [documentation website](https://srcset.js.org/components/react/).
For more details, guides and API references, check out the [documentation website](https://srcset.js.org/components/).
2 changes: 1 addition & 1 deletion packages/svelte/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,4 @@ npm i @srcset/svelte @srcset/runtime

## Documentation

For more details, guides and API references, check out the [documentation website](https://srcset.js.org/components/svelte/).
For more details, guides and API references, check out the [documentation website](https://srcset.js.org/components/).
13 changes: 9 additions & 4 deletions packages/vite-plugin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,18 @@ Vite plugin for generating responsive images.

```bash
# pnpm
pnpm add -D @srcset/vite-plugin @srcset/runtime
pnpm add -D @srcset/vite-plugin
pnpm add @srcset/runtime
# yarn
yarn add -D @srcset/vite-plugin @srcset/runtime
yarn add -D @srcset/vite-plugin
yarn add @srcset/runtime
# npm
npm i -D @srcset/vite-plugin @srcset/runtime
npm i -D @srcset/vite-plugin
npm i @srcset/runtime
```

`@srcset/runtime` is a peer dependency that ships to the browser, so it goes into the regular dependencies while the plugin stays a dev one.

## Usage

```js
Expand All @@ -58,7 +63,7 @@ export default defineConfig({
plugins: [
srcset({
rules: [
// First format is the fallback: default export and src
// Keep jpg in the list: it is what a browser without webp or avif gets
{
match: '**/*.jpg',
width: [1, 0.5],
Expand Down