@rsbuild/plugin-image-compress 0.7.6 → 0.7.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.cjs +4 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +4 -2
- package/package.json +4 -4
package/dist/index.cjs
CHANGED
|
@@ -36,6 +36,7 @@ var __publicField = (obj, key, value) => {
|
|
|
36
36
|
var src_exports = {};
|
|
37
37
|
__export(src_exports, {
|
|
38
38
|
DEFAULT_OPTIONS: () => DEFAULT_OPTIONS,
|
|
39
|
+
PLUGIN_IMAGE_COMPRESS_NAME: () => PLUGIN_IMAGE_COMPRESS_NAME,
|
|
39
40
|
pluginImageCompress: () => pluginImageCompress
|
|
40
41
|
});
|
|
41
42
|
module.exports = __toCommonJS(src_exports);
|
|
@@ -202,8 +203,9 @@ var normalizeOptions = (options) => {
|
|
|
202
203
|
const normalized = opts.map((opt) => withDefaultOptions(opt));
|
|
203
204
|
return normalized;
|
|
204
205
|
};
|
|
206
|
+
var PLUGIN_IMAGE_COMPRESS_NAME = "rsbuild:image-compress";
|
|
205
207
|
var pluginImageCompress = (...args) => ({
|
|
206
|
-
name:
|
|
208
|
+
name: PLUGIN_IMAGE_COMPRESS_NAME,
|
|
207
209
|
setup(api) {
|
|
208
210
|
const opts = normalizeOptions(castOptions(args));
|
|
209
211
|
api.modifyBundlerChain((chain, { isDev }) => {
|
|
@@ -220,5 +222,6 @@ var pluginImageCompress = (...args) => ({
|
|
|
220
222
|
// Annotate the CommonJS export names for ESM import in node:
|
|
221
223
|
0 && (module.exports = {
|
|
222
224
|
DEFAULT_OPTIONS,
|
|
225
|
+
PLUGIN_IMAGE_COMPRESS_NAME,
|
|
223
226
|
pluginImageCompress
|
|
224
227
|
});
|
package/dist/index.d.ts
CHANGED
|
@@ -31,7 +31,8 @@ interface IPluginImageCompress {
|
|
|
31
31
|
(...options: Options[]): RsbuildPlugin;
|
|
32
32
|
(options: Options[]): RsbuildPlugin;
|
|
33
33
|
}
|
|
34
|
+
declare const PLUGIN_IMAGE_COMPRESS_NAME = "rsbuild:image-compress";
|
|
34
35
|
/** Options enable by default: {@link DEFAULT_OPTIONS} */
|
|
35
36
|
declare const pluginImageCompress: IPluginImageCompress;
|
|
36
37
|
|
|
37
|
-
export { DEFAULT_OPTIONS, type IPluginImageCompress, type PluginImageCompressOptions, pluginImageCompress };
|
|
38
|
+
export { DEFAULT_OPTIONS, type IPluginImageCompress, PLUGIN_IMAGE_COMPRESS_NAME, type PluginImageCompressOptions, pluginImageCompress };
|
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.52.0_eslint@9.
|
|
11
|
+
// ../../node_modules/.pnpm/@modern-js+module-tools@2.52.0_eslint@9.5.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
|
|
|
@@ -181,8 +181,9 @@ var normalizeOptions = (options) => {
|
|
|
181
181
|
const normalized = opts.map((opt) => withDefaultOptions(opt));
|
|
182
182
|
return normalized;
|
|
183
183
|
};
|
|
184
|
+
var PLUGIN_IMAGE_COMPRESS_NAME = "rsbuild:image-compress";
|
|
184
185
|
var pluginImageCompress = (...args) => ({
|
|
185
|
-
name:
|
|
186
|
+
name: PLUGIN_IMAGE_COMPRESS_NAME,
|
|
186
187
|
setup(api) {
|
|
187
188
|
const opts = normalizeOptions(castOptions(args));
|
|
188
189
|
api.modifyBundlerChain((chain, { isDev }) => {
|
|
@@ -198,5 +199,6 @@ var pluginImageCompress = (...args) => ({
|
|
|
198
199
|
});
|
|
199
200
|
export {
|
|
200
201
|
DEFAULT_OPTIONS,
|
|
202
|
+
PLUGIN_IMAGE_COMPRESS_NAME,
|
|
201
203
|
pluginImageCompress
|
|
202
204
|
};
|
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.8",
|
|
4
4
|
"description": "Image compress plugin for Rsbuild",
|
|
5
5
|
"homepage": "https://rsbuild.dev",
|
|
6
6
|
"repository": {
|
|
@@ -29,11 +29,11 @@
|
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"@types/node": "18.x",
|
|
31
31
|
"typescript": "^5.4.2",
|
|
32
|
-
"@rsbuild/core": "0.7.
|
|
33
|
-
"@rsbuild/webpack": "0.7.
|
|
32
|
+
"@rsbuild/core": "0.7.8",
|
|
33
|
+
"@rsbuild/webpack": "0.7.8"
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {
|
|
36
|
-
"@rsbuild/core": "^0.7.
|
|
36
|
+
"@rsbuild/core": "^0.7.8"
|
|
37
37
|
},
|
|
38
38
|
"publishConfig": {
|
|
39
39
|
"access": "public",
|