@rsbuild/plugin-image-compress 0.3.7 → 0.3.8

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 CHANGED
@@ -206,8 +206,8 @@ var pluginImageCompress = (...args) => ({
206
206
  name: "rsbuild:image-compress",
207
207
  setup(api) {
208
208
  const opts = normalizeOptions(castOptions(args));
209
- api.modifyBundlerChain((chain, { isProd }) => {
210
- if (!isProd) {
209
+ api.modifyBundlerChain((chain, { isDev }) => {
210
+ if (isDev) {
211
211
  return;
212
212
  }
213
213
  chain.optimization.minimize(true);
package/dist/index.mjs CHANGED
@@ -185,8 +185,8 @@ var pluginImageCompress = (...args) => ({
185
185
  name: "rsbuild:image-compress",
186
186
  setup(api) {
187
187
  const opts = normalizeOptions(castOptions(args));
188
- api.modifyBundlerChain((chain, { isProd }) => {
189
- if (!isProd) {
188
+ api.modifyBundlerChain((chain, { isDev }) => {
189
+ if (isDev) {
190
190
  return;
191
191
  }
192
192
  chain.optimization.minimize(true);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rsbuild/plugin-image-compress",
3
- "version": "0.3.7",
3
+ "version": "0.3.8",
4
4
  "description": "Image compress plugin for Rsbuild",
5
5
  "homepage": "https://rsbuild.dev",
6
6
  "repository": {
@@ -25,18 +25,18 @@
25
25
  "dependencies": {
26
26
  "@napi-rs/image": "^1.7.0",
27
27
  "svgo": "^3.2.0",
28
- "@rsbuild/shared": "0.3.7"
28
+ "@rsbuild/shared": "0.3.8"
29
29
  },
30
30
  "devDependencies": {
31
31
  "@types/node": "16.x",
32
32
  "typescript": "^5.3.0",
33
33
  "webpack": "^5.89.0",
34
- "@rsbuild/core": "0.3.7",
35
- "@scripts/test-helper": "0.3.7",
36
- "@rsbuild/webpack": "0.3.7"
34
+ "@rsbuild/core": "0.3.8",
35
+ "@scripts/test-helper": "0.3.8",
36
+ "@rsbuild/webpack": "0.3.8"
37
37
  },
38
38
  "peerDependencies": {
39
- "@rsbuild/core": "^0.3.7"
39
+ "@rsbuild/core": "^0.3.8"
40
40
  },
41
41
  "publishConfig": {
42
42
  "access": "public",