Convention: How should tsconfig path mappings be formatted for library i...
Documentation for Sessions
📏 Convention: How should tsconfig path mappings be formatted for library i...
Date: 2026-02-05
Time: 04:40:56 UTC
Session: editor2-89.17
Agent: architecture
Confidence: 95%
Status: ✅ Documented
📋 Decision Context
Question:
How should tsconfig path mappings be formatted for library index files?
Task: Not specified
🎯 Decision Made
Chosen:
Path with .ts extension: libs/lib-name/src/index.ts
Options Considered:
- Path without extension: libs/lib-name/src/index
- Path with .ts extension: libs/lib-name/src/index.ts
- Use wildcard: libs/lib-name/src/*
- Reference dist folder
💭 Reasoning
TypeScript path mappings in tsconfig.base.json MUST include the .ts extension for index files. Without it, TypeScript cannot resolve the file and throws 'File not found' errors. WRONG: '@libs-core/ui-framework': ['libs/core/ui-framework/src/index']. CORRECT: '@libs-core/ui-framework': ['libs/core/ui-framework/src/index.ts']. This applies to all library path mappings. The wildcard paths (e.g., '@libs-core/ui-framework/': ['libs/core/ui-framework/src/']) do NOT need the extension as they match any file pattern.
📁 Files Involved
tsconfig.base.json
🔗 Related
- Decision ID:
dev_1770266456539_pwaf4vj - Session: 89
- Workspace: editor2
Auto-generated by MCP Smart Consolidation