@rsbuild/plugin-image-compress 0.7.1 → 0.7.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +4 -4
- package/dist/index.js +1 -1
- package/package.json +5 -5
package/dist/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { RsbuildPlugin } from '@rsbuild/core';
|
|
|
2
2
|
import { JpegCompressOptions, PngQuantOptions, PNGLosslessOptions } from '@napi-rs/image';
|
|
3
3
|
import { Config } from 'svgo';
|
|
4
4
|
|
|
5
|
-
type
|
|
5
|
+
type OneOrMany<T> = T | T[];
|
|
6
6
|
interface CodecBaseOptions {
|
|
7
7
|
jpeg: JpegCompressOptions;
|
|
8
8
|
png: PngQuantOptions;
|
|
@@ -12,9 +12,9 @@ interface CodecBaseOptions {
|
|
|
12
12
|
}
|
|
13
13
|
interface BaseCompressOptions<T extends Codecs> {
|
|
14
14
|
use: T;
|
|
15
|
-
test?:
|
|
16
|
-
include?:
|
|
17
|
-
exclude?:
|
|
15
|
+
test?: OneOrMany<RegExp>;
|
|
16
|
+
include?: OneOrMany<RegExp>;
|
|
17
|
+
exclude?: OneOrMany<RegExp>;
|
|
18
18
|
}
|
|
19
19
|
type FinalOptionCollection = {
|
|
20
20
|
[K in Codecs]: BaseCompressOptions<K> & CodecBaseOptions[K];
|
package/dist/index.js
CHANGED
|
@@ -8,7 +8,7 @@ var __publicField = (obj, key, value) => {
|
|
|
8
8
|
return value;
|
|
9
9
|
};
|
|
10
10
|
|
|
11
|
-
// ../../node_modules/.pnpm/@modern-js+module-tools@2.
|
|
11
|
+
// ../../node_modules/.pnpm/@modern-js+module-tools@2.51.0_eslint@9.4.0_typescript@5.4.5/node_modules/@modern-js/module-tools/shims/esm.js
|
|
12
12
|
import { fileURLToPath } from "url";
|
|
13
13
|
import path from "path";
|
|
14
14
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rsbuild/plugin-image-compress",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.3",
|
|
4
4
|
"description": "Image compress plugin for Rsbuild",
|
|
5
5
|
"homepage": "https://rsbuild.dev",
|
|
6
6
|
"repository": {
|
|
@@ -30,12 +30,12 @@
|
|
|
30
30
|
"@types/node": "18.x",
|
|
31
31
|
"typescript": "^5.4.2",
|
|
32
32
|
"webpack": "^5.91.0",
|
|
33
|
-
"@rsbuild/core": "0.7.
|
|
34
|
-
"@rsbuild/webpack": "0.7.
|
|
35
|
-
"@scripts/test-helper": "0.7.
|
|
33
|
+
"@rsbuild/core": "0.7.3",
|
|
34
|
+
"@rsbuild/webpack": "0.7.3",
|
|
35
|
+
"@scripts/test-helper": "0.7.3"
|
|
36
36
|
},
|
|
37
37
|
"peerDependencies": {
|
|
38
|
-
"@rsbuild/core": "^0.7.
|
|
38
|
+
"@rsbuild/core": "^0.7.3"
|
|
39
39
|
},
|
|
40
40
|
"publishConfig": {
|
|
41
41
|
"access": "public",
|