Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions rslib.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ const pluginGenerateMinified: (filename: string) => RsbuildPlugin = (
ecma: 5,
// allows SWC to mangle function names
module: true,
Comment thread
SoonIter marked this conversation as resolved.
compress: {
passes: 5,
unsafe: true,
},
});

logger.success(
Expand Down
4 changes: 2 additions & 2 deletions src/runtime/initialChunkRetry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -272,8 +272,8 @@ function retry(rules: NormalizedRuntimeRetryOptions[], e: Event) {
}
}

function load(config: NormalizedRuntimeRetryOptions[], e: Event) {
const targetInfo = validateTargetInfo(config, e);
function load(rules: NormalizedRuntimeRetryOptions[], e: Event) {
const targetInfo = validateTargetInfo(rules, e);
if (targetInfo === false) {
return;
}
Expand Down
3 changes: 2 additions & 1 deletion src/runtime/utils/findMatchingRule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ export function findMatchingRule(
type: string,
rules: NormalizedRuntimeRetryOptions[],
): NormalizedRuntimeRetryOptions | null {
for (const rule of rules) {
for (let i = 0; i < rules.length; i++) {
// Check test condition
const rule = rules[i];
const tester = rule.test;
let shouldMatch = true;
if (tester instanceof RegExp) {
Expand Down