@rsbuild/plugin-assets-retry 1.0.1-beta.10 → 1.0.1-beta.12
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 +2 -2
- package/dist/index.js +4 -4
- package/dist-types/types.d.ts +1 -1
- package/package.json +4 -4
package/dist/index.cjs
CHANGED
|
@@ -169,7 +169,7 @@ var pluginAssetsRetry = (userOptions = {}) => ({
|
|
|
169
169
|
const { inlineScript = true } = userOptions;
|
|
170
170
|
const getScriptPath = (environment) => {
|
|
171
171
|
const distDir = environment.config.output.distPath.js;
|
|
172
|
-
return import_node_path2.default.posix.join(distDir, `assets-retry.${"1.0.1-beta.
|
|
172
|
+
return import_node_path2.default.posix.join(distDir, `assets-retry.${"1.0.1-beta.12"}.js`);
|
|
173
173
|
};
|
|
174
174
|
const formatOptions = (config) => {
|
|
175
175
|
const options = { ...userOptions };
|
|
@@ -178,7 +178,7 @@ var pluginAssetsRetry = (userOptions = {}) => ({
|
|
|
178
178
|
}
|
|
179
179
|
if (options.minify === void 0) {
|
|
180
180
|
const minify = typeof config.output.minify === "boolean" ? config.output.minify : config.output.minify?.js;
|
|
181
|
-
options.minify = minify &&
|
|
181
|
+
options.minify = minify && config.mode === "production";
|
|
182
182
|
}
|
|
183
183
|
return options;
|
|
184
184
|
};
|
package/dist/index.js
CHANGED
|
@@ -16,12 +16,12 @@ var __publicField = (obj, key, value) => {
|
|
|
16
16
|
return value;
|
|
17
17
|
};
|
|
18
18
|
|
|
19
|
-
// ../../node_modules/.pnpm/@modern-js+module-tools@2.
|
|
19
|
+
// ../../node_modules/.pnpm/@modern-js+module-tools@2.58.0_typescript@5.5.2/node_modules/@modern-js/module-tools/shims/esm.js
|
|
20
20
|
import { fileURLToPath } from "url";
|
|
21
21
|
import path from "path";
|
|
22
22
|
var getFilename, getDirname, __dirname;
|
|
23
23
|
var init_esm = __esm({
|
|
24
|
-
"../../node_modules/.pnpm/@modern-js+module-tools@2.
|
|
24
|
+
"../../node_modules/.pnpm/@modern-js+module-tools@2.58.0_typescript@5.5.2/node_modules/@modern-js/module-tools/shims/esm.js"() {
|
|
25
25
|
"use strict";
|
|
26
26
|
getFilename = () => fileURLToPath(import.meta.url);
|
|
27
27
|
getDirname = () => path.dirname(getFilename());
|
|
@@ -159,7 +159,7 @@ var pluginAssetsRetry = (userOptions = {}) => ({
|
|
|
159
159
|
const { inlineScript = true } = userOptions;
|
|
160
160
|
const getScriptPath = (environment) => {
|
|
161
161
|
const distDir = environment.config.output.distPath.js;
|
|
162
|
-
return path3.posix.join(distDir, `assets-retry.${"1.0.1-beta.
|
|
162
|
+
return path3.posix.join(distDir, `assets-retry.${"1.0.1-beta.12"}.js`);
|
|
163
163
|
};
|
|
164
164
|
const formatOptions = (config) => {
|
|
165
165
|
const options = { ...userOptions };
|
|
@@ -168,7 +168,7 @@ var pluginAssetsRetry = (userOptions = {}) => ({
|
|
|
168
168
|
}
|
|
169
169
|
if (options.minify === void 0) {
|
|
170
170
|
const minify = typeof config.output.minify === "boolean" ? config.output.minify : config.output.minify?.js;
|
|
171
|
-
options.minify = minify &&
|
|
171
|
+
options.minify = minify && config.mode === "production";
|
|
172
172
|
}
|
|
173
173
|
return options;
|
|
174
174
|
};
|
package/dist-types/types.d.ts
CHANGED
|
@@ -53,7 +53,7 @@ export type PluginAssetsRetryOptions = {
|
|
|
53
53
|
inlineScript?: boolean;
|
|
54
54
|
/**
|
|
55
55
|
* Whether to minify the runtime JavaScript code of Assets Retry plugin.
|
|
56
|
-
* @default
|
|
56
|
+
* @default rsbuildConfig.mode === 'production'
|
|
57
57
|
*/
|
|
58
58
|
minify?: boolean;
|
|
59
59
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rsbuild/plugin-assets-retry",
|
|
3
|
-
"version": "1.0.1-beta.
|
|
3
|
+
"version": "1.0.1-beta.12",
|
|
4
4
|
"description": "Assets retry plugin for Rsbuild",
|
|
5
5
|
"homepage": "https://rsbuild.dev",
|
|
6
6
|
"repository": {
|
|
@@ -31,12 +31,12 @@
|
|
|
31
31
|
"@babel/preset-env": "^7.25.3",
|
|
32
32
|
"@babel/preset-typescript": "^7.24.7",
|
|
33
33
|
"@types/serialize-javascript": "^5.0.4",
|
|
34
|
-
"terser": "5.31.
|
|
34
|
+
"terser": "5.31.5",
|
|
35
35
|
"typescript": "^5.5.2",
|
|
36
|
-
"@rsbuild/core": "1.0.1-beta.
|
|
36
|
+
"@rsbuild/core": "1.0.1-beta.12"
|
|
37
37
|
},
|
|
38
38
|
"peerDependencies": {
|
|
39
|
-
"@rsbuild/core": "^1.0.1-beta.
|
|
39
|
+
"@rsbuild/core": "^1.0.1-beta.12"
|
|
40
40
|
},
|
|
41
41
|
"publishConfig": {
|
|
42
42
|
"access": "public",
|