@rsbuild/plugin-image-compress 0.1.3 → 0.1.4
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.js +2 -1
- package/dist/index.mjs +2 -1
- package/package.json +5 -5
package/dist/index.js
CHANGED
|
@@ -121,7 +121,8 @@ ${cause.message}` : cause.message;
|
|
|
121
121
|
const opts = { ...codec.defaultOptions, ...this.options };
|
|
122
122
|
const handleAsset = async (name) => {
|
|
123
123
|
const info = compilation.getAsset(name)?.info;
|
|
124
|
-
|
|
124
|
+
const fileName = name.split("?")[0];
|
|
125
|
+
if (info?.minimized || !matchObject(opts, fileName)) {
|
|
125
126
|
return;
|
|
126
127
|
}
|
|
127
128
|
const { source: inputSource } = compilation.getAsset(name);
|
package/dist/index.mjs
CHANGED
|
@@ -99,7 +99,8 @@ ${cause.message}` : cause.message;
|
|
|
99
99
|
const opts = { ...codec.defaultOptions, ...this.options };
|
|
100
100
|
const handleAsset = async (name) => {
|
|
101
101
|
const info = compilation.getAsset(name)?.info;
|
|
102
|
-
|
|
102
|
+
const fileName = name.split("?")[0];
|
|
103
|
+
if (info?.minimized || !matchObject(opts, fileName)) {
|
|
103
104
|
return;
|
|
104
105
|
}
|
|
105
106
|
const { source: inputSource } = compilation.getAsset(name);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rsbuild/plugin-image-compress",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"description": "Image compress plugin for Rsbuild",
|
|
5
5
|
"homepage": "https://rsbuild.dev",
|
|
6
6
|
"repository": {
|
|
@@ -24,15 +24,15 @@
|
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"@napi-rs/image": "^1.7.0",
|
|
26
26
|
"svgo": "^3.0.2",
|
|
27
|
-
"@rsbuild/shared": "0.1.
|
|
27
|
+
"@rsbuild/shared": "0.1.4"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"@types/node": "^16",
|
|
31
31
|
"typescript": "^5.3.0",
|
|
32
32
|
"webpack": "^5.89.0",
|
|
33
|
-
"@rsbuild/core": "0.1.
|
|
34
|
-
"@rsbuild/
|
|
35
|
-
"@rsbuild/
|
|
33
|
+
"@rsbuild/core": "0.1.4",
|
|
34
|
+
"@rsbuild/webpack": "0.1.4",
|
|
35
|
+
"@rsbuild/test-helper": "0.1.4"
|
|
36
36
|
},
|
|
37
37
|
"publishConfig": {
|
|
38
38
|
"access": "public",
|