(options: TsConfigOptions)
| 229 | }; |
| 230 | |
| 231 | export const getTsConfigData = (options: TsConfigOptions) => { |
| 232 | const verbose = !!options.verbose; |
| 233 | |
| 234 | let candidatePath = getProjectFilePath('tsconfig.app.json'); |
| 235 | if (!fs.existsSync(candidatePath)) { |
| 236 | candidatePath = getProjectFilePath('tsconfig.json'); |
| 237 | } |
| 238 | tsConfigPath = candidatePath; |
| 239 | |
| 240 | if (!cachedConfig || cachedPath !== candidatePath) { |
| 241 | cachedConfig = getTsConfigPaths(verbose); |
| 242 | cachedPath = candidatePath; |
| 243 | if (verbose) { |
| 244 | console.log('📁 Loaded TypeScript path configuration'); |
| 245 | } |
| 246 | } |
| 247 | |
| 248 | const aliases = createTsConfigAliases({ |
| 249 | paths: cachedConfig.paths, |
| 250 | baseUrl: cachedConfig.baseUrl, |
| 251 | platform: options.platform, |
| 252 | verbose, |
| 253 | }); |
| 254 | |
| 255 | if (aliases.length > 0 && verbose) { |
| 256 | console.log('📁 Created TypeScript path aliases:', aliases.length); |
| 257 | } |
| 258 | |
| 259 | return { |
| 260 | paths: cachedConfig.paths, |
| 261 | baseUrl: cachedConfig.baseUrl, |
| 262 | aliases, |
| 263 | }; |
| 264 | }; |
no test coverage detected