MCPcopy Index your code
hub / github.com/NativeScript/NativeScript / resolveModuleName

Function resolveModuleName

packages/core/module-name-resolver/index.ts:55–72  ·  view source on GitHub ↗
(path: string, ext: string)

Source from the content-addressed store, hash-verified

53}
54
55export function resolveModuleName(path: string, ext: string): string {
56 if (global.__snapshot) {
57 return resolveModuleSnapshot(path, ext);
58 }
59
60 if (!getResolveInstance()) {
61 _setResolver(
62 new ModuleNameResolver({
63 width: Screen.mainScreen.widthDIPs,
64 height: Screen.mainScreen.heightDIPs,
65 os: Device.os,
66 deviceType: Device.deviceType,
67 }),
68 );
69 }
70
71 return getResolveInstance().resolveModuleName(path, ext);
72}
73
74function resolveModuleSnapshot(path, ext) {
75 Trace.write(`Resolving module in SNAPSHOT context - path: '${path}' with ext: '${ext}'`, Trace.categories.ModuleNameResolver);

Callers 5

fromURIMethod · 0.90
createViewFromEntryMethod · 0.90
loadInternalFunction · 0.90
loadCustomComponentFunction · 0.90
index.tsFile · 0.90

Calls 4

getResolveInstanceFunction · 0.90
_setResolverFunction · 0.90
resolveModuleSnapshotFunction · 0.85
resolveModuleNameMethod · 0.65

Tested by

no test coverage detected