( projectDir: string, url: string, )
| 150 | } |
| 151 | |
| 152 | function resolveExistingLocalAsset( |
| 153 | projectDir: string, |
| 154 | url: string, |
| 155 | ): { resolved: string; rootRelativePath: string } | null { |
| 156 | const projectRoot = resolve(projectDir); |
| 157 | const resolved = resolveLocalAssetCandidates(projectRoot, url).find(existsSync); |
| 158 | if (!resolved) return null; |
| 159 | return { resolved, rootRelativePath: relative(projectRoot, resolved) }; |
| 160 | } |
| 161 | |
| 162 | function resolveCssAssetCandidates( |
| 163 | projectDir: string, |
no test coverage detected