mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-15 09:33:03 -04:00
Reporter: Test mapMangledModule
This commit is contained in:
parent
a01ee40591
commit
ceaaf9ab8a
2 changed files with 15 additions and 4 deletions
|
@ -279,7 +279,7 @@ export function findModuleFactory(...code: string[]) {
|
|||
return wreq.m[id];
|
||||
}
|
||||
|
||||
export const lazyWebpackSearchHistory = [] as Array<["find" | "findByProps" | "findByCode" | "findStore" | "findComponent" | "findComponentByCode" | "findExportedComponent" | "waitFor" | "waitForComponent" | "waitForStore" | "proxyLazyWebpack" | "LazyComponentWebpack" | "extractAndLoadChunks", any[]]>;
|
||||
export const lazyWebpackSearchHistory = [] as Array<["find" | "findByProps" | "findByCode" | "findStore" | "findComponent" | "findComponentByCode" | "findExportedComponent" | "waitFor" | "waitForComponent" | "waitForStore" | "proxyLazyWebpack" | "LazyComponentWebpack" | "extractAndLoadChunks" | "mapMangledModule", any[]]>;
|
||||
|
||||
/**
|
||||
* This is just a wrapper around {@link proxyLazy} to make our reporter test for your webpack finds.
|
||||
|
@ -483,6 +483,8 @@ export const mapMangledModule = traceFunction("mapMangledModule", function mapMa
|
|||
* })
|
||||
*/
|
||||
export function mapMangledModuleLazy<S extends string>(code: string, mappers: Record<S, FilterFn>): Record<S, any> {
|
||||
if (IS_REPORTER) lazyWebpackSearchHistory.push(["mapMangledModule", [code, mappers]]);
|
||||
|
||||
return proxyLazy(() => mapMangledModule(code, mappers));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue