@rsbuild/plugin-image-compress 0.1.2 → 0.1.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 CHANGED
@@ -1,4 +1,4 @@
1
- import { RsbuildPlugin } from '@rsbuild/webpack';
1
+ import { RsbuildPlugin } from '@rsbuild/core';
2
2
  import { JpegCompressOptions, PngQuantOptions, PNGLosslessOptions } from '@napi-rs/image';
3
3
  import { Config } from 'svgo';
4
4
 
package/dist/index.js CHANGED
@@ -120,9 +120,8 @@ ${cause.message}` : cause.message;
120
120
  }
121
121
  const opts = { ...codec.defaultOptions, ...this.options };
122
122
  const handleAsset = async (name) => {
123
- var _a;
124
- const info = (_a = compilation.getAsset(name)) == null ? void 0 : _a.info;
125
- if ((info == null ? void 0 : info.minimized) || !matchObject(opts, name)) {
123
+ const info = compilation.getAsset(name)?.info;
124
+ if (info?.minimized || !matchObject(opts, name)) {
126
125
  return;
127
126
  }
128
127
  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.2",
3
+ "version": "0.1.3",
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.2"
27
+ "@rsbuild/shared": "0.1.3"
28
28
  },
29
29
  "devDependencies": {
30
30
  "@types/node": "^16",
31
31
  "typescript": "^5.3.0",
32
32
  "webpack": "^5.89.0",
33
- "@rsbuild/test-helper": "0.1.2",
34
- "@rsbuild/webpack": "0.1.2",
35
- "@rsbuild/core": "0.1.2"
33
+ "@rsbuild/core": "0.1.3",
34
+ "@rsbuild/test-helper": "0.1.3",
35
+ "@rsbuild/webpack": "0.1.3"
36
36
  },
37
37
  "publishConfig": {
38
38
  "access": "public",