We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e248e4e commit a9ae386Copy full SHA for a9ae386
src/utils.ts
@@ -263,12 +263,18 @@ export function normalizeConfigFileOptions(
263
return undefined;
264
}
265
266
+const aliasCache = new Map<string, Record<string, string[]>>();
267
+
268
export function normalizeAlias(
269
alias: Record<string, string | string[]> | undefined,
270
parent: string,
271
): Record<string, string[]> | undefined {
272
if (!alias) return undefined;
273
274
+ if (aliasCache.has(parent)) {
275
+ return aliasCache.get(parent);
276
+ }
277
278
return Object.keys(alias).reduce(
279
(acc, key) => {
280
const value = Array.isArray(alias[key]) ? alias[key] : [alias[key]];
0 commit comments