* Builds Vite `resolve.alias` entries from the project's `tsconfig.json` * `compilerOptions.paths`. `tsconfig.base.json` is the single source of truth; * `ts.parseJsonConfigFileContent` handles the `extends` chain and the * `${configDir}` template substitution.
(input: string)
| 89 | * `${configDir}` template substitution. |
| 90 | */ |
| 91 | function escapeRegExp(input: string): string { |
| 92 | return input.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); |
| 93 | } |
| 94 | |
| 95 | export function buildTsconfigAliases(projectDir: string): Array<{ find: RegExp; replacement: string }> { |
| 96 | const tsconfigPath = ts.findConfigFile(projectDir, ts.sys.fileExists); |
no test coverage detected