Skip to content

Commit 0bda8df

Browse files
committed
v4.0.0
1 parent d34463f commit 0bda8df

File tree

4 files changed

+21
-13
lines changed

4 files changed

+21
-13
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,14 @@ DO NOT TOUCH. SAVE IT ON TOP.
2424
2525
-->
2626

27+
## [4.0.0] - 2021-02-01
28+
### Breaking
29+
- Requires `Node 12+`
30+
31+
### Added
32+
- Webpack v5 support;
33+
- AVIF support.
34+
2735
## [3.0.0] - 2020-06-23
2836
### Changed
2937
- New exports signature;

README.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Highly customizable loader for generating responsive images.
2929

3030
- [Responsive images](https://developer.mozilla.org/ru/docs/Learn/HTML/Multimedia_and_embedding/Responsive_images) 🌠
3131
- Optimize images with [imagemin](https://www.npmjs.com/package/imagemin) 🗜
32-
- Convert images to [modern formats such as WebP](https://developer.mozilla.org/ru/docs/Learn/HTML/Multimedia_and_embedding/Responsive_images#Use_modern_image_formats_boldly) 📸
32+
- Convert images to [modern formats](https://developer.mozilla.org/en-US/docs/Learn/HTML/Multimedia_and_embedding/Responsive_images#use_modern_image_formats_boldly) such as [WebP](https://developers.google.com/speed/webp) and [AVIF](https://jakearchibald.com/2020/avif-has-landed/) 📸
3333

3434
## Install
3535

@@ -183,8 +183,8 @@ Extends [common options](#common-options).
183183
| Option | Type | Description | Default |
184184
|--------|------|-------------|---------|
185185
| match | [Matcher] | There is support of 3 types of matchers:<br>1. Glob pattern of file path;<br>2. Media query to match image by size;<br>3. `(path: string, size: ISize, source: Vinyl) => boolean` function. | all images |
186-
| format | [SupportedExtension]\|[SupportedExtension]\[\] | Output image(s) formats to convert. | no convert |
187-
| width | number\|number[] | Output image(s) widths to resize, value less than or equal to 1 will be detected as multiplier. | `[1]` |
186+
| format | [SupportedExtension] \| [SupportedExtension]\[\] | Output image(s) formats to convert. | no convert |
187+
| width | number \| number[] | Output image(s) widths to resize, value less than or equal to 1 will be detected as multiplier. | `[1]` |
188188
| exports | [IExports](#exports-options) | Default exported image description.<br>Also you can pass it through query parameters.<br>Example: `background-image: url(./image.jpg?width=320&format=webp);` | `{}` |
189189
| only | boolean | Stop trying to match other rules, if this rule is matched. | `false` |
190190

@@ -194,21 +194,21 @@ Extends [common options](#common-options).
194194

195195
| Option | Type | Description | Default |
196196
|--------|------|-------------|---------|
197-
| name | string\|Function | See [file-loader docs](https://github.com/webpack-contrib/file-loader#name). Also `[postfix]` placeholder is available. | |
198-
| outputPath | string\|Function | See [file-loader docs](https://github.com/webpack-contrib/file-loader#outputpath) | |
199-
| publicPath | string\|Function |See [file-loader docs](https://github.com/webpack-contrib/file-loader#publicpath) | |
197+
| name | string \| Function | See [file-loader docs](https://github.com/webpack-contrib/file-loader#name). Also `[postfix]` placeholder is available. | |
198+
| outputPath | string \| Function | See [file-loader docs](https://github.com/webpack-contrib/file-loader#outputpath) | |
199+
| publicPath | string \| Function |See [file-loader docs](https://github.com/webpack-contrib/file-loader#publicpath) | |
200200
| context | string | See [file-loader docs](https://github.com/webpack-contrib/file-loader#context) | |
201201
| emitFile | boolean | See [file-loader docs](https://github.com/webpack-contrib/file-loader#emitfile) | |
202202
| regExp | RegExp | See [file-loader docs](https://github.com/webpack-contrib/file-loader#regexp) | |
203203
| rules | [IRule](#rule-options)\[\] | Rules. | `[]` |
204204
| exports | [IExports](#exports-options) | Default exported image description.<br>Also you can pass it through query parameters.<br>Example: `background-image: url(./image.jpg?width=320&format=webp);` | `{}` |
205205

206206
[defaults.ts]: https://github.com/TrigenSoftware/flexis-srcset/tree/master/src/defaults.ts
207-
[IProcessingConfig]: https://trigensoftware.github.io/flexis-srcset/interfaces/_types_.iprocessingconfig.html
208-
[IOptimizationConfig]: https://trigensoftware.github.io/flexis-srcset/interfaces/_types_.ioptimizationconfig.html
209-
[Postfix]: https://trigensoftware.github.io/flexis-srcset/modules/_types_.html#postfix
210-
[Matcher]: https://trigensoftware.github.io/flexis-srcset/modules/_helpers_.html#matcher
211-
[SupportedExtension]: https://trigensoftware.github.io/flexis-srcset/modules/_extensions_.html#supportedextension
207+
[IProcessingConfig]: https://trigensoftware.github.io/flexis-srcset/interfaces/types.iprocessingconfig.html
208+
[IOptimizationConfig]: https://trigensoftware.github.io/flexis-srcset/interfaces/types.ioptimizationconfig.html
209+
[Postfix]: https://trigensoftware.github.io/flexis-srcset/modules/types.html#postfix
210+
[Matcher]: https://trigensoftware.github.io/flexis-srcset/modules/helpers.html#matcher
211+
[SupportedExtension]: https://trigensoftware.github.io/flexis-srcset/modules/extensions.html#supportedextension
212212

213213
## Using with TypeScript
214214

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@flexis/srcset-loader",
3-
"version": "3.3.1",
3+
"version": "4.0.0",
44
"description": "Highly customizable loader for generating responsive images.",
55
"author": "dangreen",
66
"license": "MIT",

src/types.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export type Src = {
1111
/**
1212
* Image file format.
1313
**/
14-
format: 'webp' | 'jpg' | 'png' | 'gif' | 'svg';
14+
format: 'avif' | 'webp' | 'jpg' | 'png' | 'gif' | 'svg';
1515
/**
1616
* Mime type of an image.
1717
* Example: 'image/svg+xml', 'image/jpeg'...

0 commit comments

Comments
 (0)