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

Function getTsConfigData

packages/vite/helpers/ts-config-paths.ts:231–264  ·  view source on GitHub ↗
(options: TsConfigOptions)

Source from the content-addressed store, hash-verified

229};
230
231export 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};

Callers 1

baseConfigFunction · 0.85

Calls 4

getTsConfigPathsFunction · 0.85
createTsConfigAliasesFunction · 0.85
getProjectFilePathFunction · 0.70
logMethod · 0.45

Tested by

no test coverage detected