mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-18 13:51:27 +08:00
chore: cleanup
This commit is contained in:
@ -20,6 +20,7 @@ export class ModuleNameResolver implements ModuleNameResolverType {
|
||||
let result: string = this._cache[key];
|
||||
if (result === undefined) {
|
||||
result = this.resolveModuleNameImpl(path, ext);
|
||||
console.log('resolveModuleName result:', result);
|
||||
this._cache[key] = result;
|
||||
}
|
||||
|
||||
@ -43,13 +44,11 @@ export class ModuleNameResolver implements ModuleNameResolverType {
|
||||
|
||||
const candidates = this.getCandidates(path, ext);
|
||||
result = findMatch(path, ext, candidates, this.context);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
private getCandidates(path: string, ext: string): Array<string> {
|
||||
const candidates = this.moduleListProvider().filter((moduleName) => moduleName.startsWith(path) && (!ext || moduleName.endsWith(ext)));
|
||||
|
||||
return candidates;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user