(path: string, ext: string)
| 53 | } |
| 54 | |
| 55 | export 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 | |
| 74 | function resolveModuleSnapshot(path, ext) { |
| 75 | Trace.write(`Resolving module in SNAPSHOT context - path: '${path}' with ext: '${ext}'`, Trace.categories.ModuleNameResolver); |
no test coverage detected