@rsbuild/plugin-assets-retry 0.6.0 → 0.6.2
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 +7 -7
- package/dist/index.mjs +6 -6
- package/package.json +5 -5
package/dist/index.js
CHANGED
|
@@ -58,12 +58,11 @@ var AssetsRetryPlugin_exports = {};
|
|
|
58
58
|
__export(AssetsRetryPlugin_exports, {
|
|
59
59
|
AssetsRetryPlugin: () => AssetsRetryPlugin
|
|
60
60
|
});
|
|
61
|
-
var import_node_path,
|
|
61
|
+
var import_node_path, import_shared, _retryOptions, AssetsRetryPlugin;
|
|
62
62
|
var init_AssetsRetryPlugin = __esm({
|
|
63
63
|
"src/AssetsRetryPlugin.ts"() {
|
|
64
64
|
"use strict";
|
|
65
65
|
import_node_path = __toESM(require("path"));
|
|
66
|
-
import_webpack_sources = __toESM(require("@rsbuild/shared/webpack-sources"));
|
|
67
66
|
import_shared = require("@rsbuild/shared");
|
|
68
67
|
AssetsRetryPlugin = class {
|
|
69
68
|
constructor(options) {
|
|
@@ -104,7 +103,7 @@ var init_AssetsRetryPlugin = __esm({
|
|
|
104
103
|
if (!this.scriptPath) {
|
|
105
104
|
this.scriptPath = import_node_path.default.posix.join(
|
|
106
105
|
this.distDir,
|
|
107
|
-
`assets-retry.${"0.6.
|
|
106
|
+
`assets-retry.${"0.6.2"}.js`
|
|
108
107
|
);
|
|
109
108
|
}
|
|
110
109
|
return this.scriptPath;
|
|
@@ -119,11 +118,12 @@ var init_AssetsRetryPlugin = __esm({
|
|
|
119
118
|
name: this.name,
|
|
120
119
|
stage: compiler.webpack.Compilation.PROCESS_ASSETS_STAGE_PRE_PROCESS
|
|
121
120
|
},
|
|
122
|
-
async (
|
|
121
|
+
async () => {
|
|
123
122
|
const scriptPath = await this.getScriptPath();
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
123
|
+
const code = await this.getRetryCode();
|
|
124
|
+
compilation.emitAsset(
|
|
125
|
+
scriptPath,
|
|
126
|
+
new compiler.webpack.sources.RawSource(code, false)
|
|
127
127
|
);
|
|
128
128
|
}
|
|
129
129
|
);
|
package/dist/index.mjs
CHANGED
|
@@ -53,7 +53,6 @@ __export(AssetsRetryPlugin_exports, {
|
|
|
53
53
|
AssetsRetryPlugin: () => AssetsRetryPlugin
|
|
54
54
|
});
|
|
55
55
|
import path2 from "path";
|
|
56
|
-
import WebpackSources from "@rsbuild/shared/webpack-sources";
|
|
57
56
|
import {
|
|
58
57
|
fse,
|
|
59
58
|
withPublicPath,
|
|
@@ -104,7 +103,7 @@ var init_AssetsRetryPlugin = __esm({
|
|
|
104
103
|
if (!this.scriptPath) {
|
|
105
104
|
this.scriptPath = path2.posix.join(
|
|
106
105
|
this.distDir,
|
|
107
|
-
`assets-retry.${"0.6.
|
|
106
|
+
`assets-retry.${"0.6.2"}.js`
|
|
108
107
|
);
|
|
109
108
|
}
|
|
110
109
|
return this.scriptPath;
|
|
@@ -119,11 +118,12 @@ var init_AssetsRetryPlugin = __esm({
|
|
|
119
118
|
name: this.name,
|
|
120
119
|
stage: compiler.webpack.Compilation.PROCESS_ASSETS_STAGE_PRE_PROCESS
|
|
121
120
|
},
|
|
122
|
-
async (
|
|
121
|
+
async () => {
|
|
123
122
|
const scriptPath = await this.getScriptPath();
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
123
|
+
const code = await this.getRetryCode();
|
|
124
|
+
compilation.emitAsset(
|
|
125
|
+
scriptPath,
|
|
126
|
+
new compiler.webpack.sources.RawSource(code, false)
|
|
127
127
|
);
|
|
128
128
|
}
|
|
129
129
|
);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rsbuild/plugin-assets-retry",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.2",
|
|
4
4
|
"description": "Assets retry plugin for Rsbuild",
|
|
5
5
|
"homepage": "https://rsbuild.dev",
|
|
6
6
|
"repository": {
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
],
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"serialize-javascript": "^6.0.2",
|
|
27
|
-
"@rsbuild/shared": "0.6.
|
|
27
|
+
"@rsbuild/shared": "0.6.2"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"@babel/core": "^7.24.4",
|
|
@@ -34,11 +34,11 @@
|
|
|
34
34
|
"html-webpack-plugin": "npm:html-rspack-plugin@5.6.2",
|
|
35
35
|
"terser": "5.29.2",
|
|
36
36
|
"typescript": "^5.4.2",
|
|
37
|
-
"@rsbuild/core": "0.6.
|
|
38
|
-
"@scripts/test-helper": "0.6.
|
|
37
|
+
"@rsbuild/core": "0.6.2",
|
|
38
|
+
"@scripts/test-helper": "0.6.2"
|
|
39
39
|
},
|
|
40
40
|
"peerDependencies": {
|
|
41
|
-
"@rsbuild/core": "^0.6.
|
|
41
|
+
"@rsbuild/core": "^0.6.2"
|
|
42
42
|
},
|
|
43
43
|
"publishConfig": {
|
|
44
44
|
"access": "public",
|