File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed
packages/retry-plugin/src Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ async function fetchWithRetry({
33
33
} catch ( error ) {
34
34
if ( retryTimes <= 0 ) {
35
35
logger . log (
36
- `[ Module Federation RetryPlugin ] : retry failed after ${ retryTimes } times for url: ${ url } , now will try fallbackUrl url` ,
36
+ `${ PLUGIN_IDENTIFIER } : retry failed after ${ retryTimes } times for url: ${ url } , now will try fallbackUrl url` ,
37
37
) ;
38
38
39
39
if ( fallback && typeof fallback === 'function' ) {
Original file line number Diff line number Diff line change 1
- import { defaultRetries , defaultRetryDelay } from './constant' ;
1
+ import {
2
+ defaultRetries ,
3
+ defaultRetryDelay ,
4
+ PLUGIN_IDENTIFIER ,
5
+ } from './constant' ;
2
6
import type { ScriptCommonRetryOption } from './types' ;
3
7
import logger from './logger' ;
4
8
@@ -22,7 +26,7 @@ export function scriptCommonRetry<T extends (...args: any[]) => void>({
22
26
let attempts = 0 ;
23
27
while ( attempts - 1 < retryTimes ) {
24
28
try {
25
- beforeExecuteRetry && beforeExecuteRetry ( ) ;
29
+ beforeExecuteRetry ( ) ;
26
30
retryResponse = await retryFn ( ...args ) ;
27
31
break ;
28
32
} catch ( error ) {
@@ -36,7 +40,7 @@ export function scriptCommonRetry<T extends (...args: any[]) => void>({
36
40
throw error ;
37
41
}
38
42
logger . log (
39
- `[ Module Federation RetryPlugin ] : script resource retrying ${ attempts } times` ,
43
+ `${ PLUGIN_IDENTIFIER } : script resource retrying ${ attempts } times` ,
40
44
) ;
41
45
await new Promise ( ( resolve ) => setTimeout ( resolve , retryDelay ) ) ;
42
46
}
You can’t perform that action at this time.
0 commit comments