You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -321,7 +321,7 @@ Or pass a function that receives `AssetsRetryHookContext` and returns the delay
321
321
```js
322
322
// Calculate delay based on retry attempts
323
323
pluginAssetsRetry({
324
-
delay:(ctx)=> (ctx.times+1) *1000,
324
+
delay:ctx=> (ctx.times+1) *1000,
325
325
});
326
326
```
327
327
@@ -336,12 +336,12 @@ When you use Assets Retry plugin, the Rsbuild injects some runtime code into the
336
336
Here's an example of incorrect usage:
337
337
338
338
```js
339
-
import { someMethod } from"utils";
339
+
import { someMethod } from'utils';
340
340
341
341
pluginAssetsRetry({
342
342
onRetry() {
343
343
// Incorrect usage, includes sensitive information
344
-
constprivateToken="a-private-token";
344
+
constprivateToken='a-private-token';
345
345
346
346
// Incorrect usage, uses an external method
347
347
someMethod(privateToken);
@@ -353,6 +353,10 @@ pluginAssetsRetry({
353
353
354
354
Assets Retry plugin may not work in the following scenarios:
355
355
356
+
### Sync script tag loaded resources
357
+
358
+
`<script src="..."></script>` tags load resources synchronously, and retrying them does not guarantee the order of resource loading. Therefore, the Assets Retry plugin will not retry resources loaded by synchronous script tags. It will only retry resources loaded by async/defer script tags.
359
+
356
360
### Module Federation
357
361
358
362
For remote modules loaded by Module Federation, you can use the [@module-federation/retry-plugin](https://www.npmjs.com/package/@module-federation/retry-plugin) from Module Federation 2.0 to implement static asset retries.
0 commit comments