@rsbuild/plugin-assets-retry 0.7.7 → 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 CHANGED
@@ -58,11 +58,12 @@ var AssetsRetryPlugin_exports = {};
58
58
  __export(AssetsRetryPlugin_exports, {
59
59
  AssetsRetryPlugin: () => AssetsRetryPlugin
60
60
  });
61
- var import_node_path, import_shared, _retryOptions, AssetsRetryPlugin;
61
+ var import_node_path, import_core, 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_core = require("@rsbuild/core");
66
67
  import_shared = require("@rsbuild/shared");
67
68
  AssetsRetryPlugin = class {
68
69
  constructor(options) {
@@ -105,7 +106,7 @@ var init_AssetsRetryPlugin = __esm({
105
106
  if (!this.scriptPath) {
106
107
  this.scriptPath = import_node_path.default.posix.join(
107
108
  this.distDir,
108
- `assets-retry.${"0.7.7"}.js`
109
+ `assets-retry.${"0.7.8"}.js`
109
110
  );
110
111
  }
111
112
  return this.scriptPath;
@@ -144,7 +145,10 @@ var init_AssetsRetryPlugin = __esm({
144
145
  });
145
146
  } else {
146
147
  const publicPath = (0, import_shared.getPublicPathFromCompiler)(compiler);
147
- const url = (0, import_shared.withPublicPath)(await this.getScriptPath(), publicPath);
148
+ const url = (0, import_core.ensureAssetPrefix)(
149
+ await this.getScriptPath(),
150
+ publicPath
151
+ );
148
152
  data.headTags.unshift({
149
153
  ...scriptTag,
150
154
  attributes: {
@@ -188,12 +192,12 @@ ${appendSource}`, "utf-8");
188
192
  throw err;
189
193
  }
190
194
  }
191
- var import_node_path2, import_core, import_shared2, import_serialize_javascript, AsyncChunkRetryPlugin;
195
+ var import_node_path2, import_core2, import_shared2, import_serialize_javascript, AsyncChunkRetryPlugin;
192
196
  var init_AsyncChunkRetryPlugin = __esm({
193
197
  "src/AsyncChunkRetryPlugin.ts"() {
194
198
  "use strict";
195
199
  import_node_path2 = __toESM(require("path"));
196
- import_core = require("@rsbuild/core");
200
+ import_core2 = require("@rsbuild/core");
197
201
  import_shared2 = require("@rsbuild/shared");
198
202
  import_serialize_javascript = __toESM(require("serialize-javascript"));
199
203
  AsyncChunkRetryPlugin = class {
@@ -213,7 +217,7 @@ var init_AsyncChunkRetryPlugin = __esm({
213
217
  ]);
214
218
  }
215
219
  getRawRuntimeRetryCode() {
216
- const { RuntimeGlobals } = import_core.rspack;
220
+ const { RuntimeGlobals } = import_core2.rspack;
217
221
  const filename = "asyncChunkRetry";
218
222
  const runtimeFilePath = import_node_path2.default.join(
219
223
  __dirname,
package/dist/index.js CHANGED
@@ -34,12 +34,12 @@ var __privateSet = (obj, member, value, setter) => {
34
34
  return value;
35
35
  };
36
36
 
37
- // ../../node_modules/.pnpm/@modern-js+module-tools@2.52.0_eslint@9.4.0_typescript@5.4.5/node_modules/@modern-js/module-tools/shims/esm.js
37
+ // ../../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
38
38
  import { fileURLToPath } from "url";
39
39
  import path from "path";
40
40
  var getFilename, getDirname, __dirname;
41
41
  var init_esm = __esm({
42
- "../../node_modules/.pnpm/@modern-js+module-tools@2.52.0_eslint@9.4.0_typescript@5.4.5/node_modules/@modern-js/module-tools/shims/esm.js"() {
42
+ "../../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"() {
43
43
  "use strict";
44
44
  getFilename = () => fileURLToPath(import.meta.url);
45
45
  getDirname = () => path.dirname(getFilename());
@@ -53,11 +53,11 @@ __export(AssetsRetryPlugin_exports, {
53
53
  AssetsRetryPlugin: () => AssetsRetryPlugin
54
54
  });
55
55
  import path2 from "path";
56
+ import { ensureAssetPrefix } from "@rsbuild/core";
56
57
  import {
57
58
  fse,
58
59
  generateScriptTag,
59
- getPublicPathFromCompiler,
60
- withPublicPath
60
+ getPublicPathFromCompiler
61
61
  } from "@rsbuild/shared";
62
62
  var _retryOptions, AssetsRetryPlugin;
63
63
  var init_AssetsRetryPlugin = __esm({
@@ -105,7 +105,7 @@ var init_AssetsRetryPlugin = __esm({
105
105
  if (!this.scriptPath) {
106
106
  this.scriptPath = path2.posix.join(
107
107
  this.distDir,
108
- `assets-retry.${"0.7.7"}.js`
108
+ `assets-retry.${"0.7.8"}.js`
109
109
  );
110
110
  }
111
111
  return this.scriptPath;
@@ -144,7 +144,10 @@ var init_AssetsRetryPlugin = __esm({
144
144
  });
145
145
  } else {
146
146
  const publicPath = getPublicPathFromCompiler(compiler);
147
- const url = withPublicPath(await this.getScriptPath(), publicPath);
147
+ const url = ensureAssetPrefix(
148
+ await this.getScriptPath(),
149
+ publicPath
150
+ );
148
151
  data.headTags.unshift({
149
152
  ...scriptTag,
150
153
  attributes: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rsbuild/plugin-assets-retry",
3
- "version": "0.7.7",
3
+ "version": "0.7.8",
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.7.7"
27
+ "@rsbuild/shared": "0.7.8"
28
28
  },
29
29
  "devDependencies": {
30
30
  "@babel/core": "^7.24.7",
@@ -34,10 +34,10 @@
34
34
  "html-webpack-plugin": "npm:html-rspack-plugin@5.7.2",
35
35
  "terser": "5.31.1",
36
36
  "typescript": "^5.4.2",
37
- "@rsbuild/core": "0.7.7"
37
+ "@rsbuild/core": "0.7.8"
38
38
  },
39
39
  "peerDependencies": {
40
- "@rsbuild/core": "^0.7.7"
40
+ "@rsbuild/core": "^0.7.8"
41
41
  },
42
42
  "publishConfig": {
43
43
  "access": "public",