Skip to content

Commit 663d906

Browse files
committed
update decision docs
1 parent 5b62cb9 commit 663d906

File tree

2 files changed

+43
-1
lines changed

2 files changed

+43
-1
lines changed

docs/decisions/031-imports.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22

33
Date: 2023-08-16
44

5-
Status: accepted
5+
Status: superseded by [046-remove-path-aliases](./046-remove-path-aliases.md)
6+
due to TypeScript's native support for the `"imports"` field in package.json.
67

78
## Context
89

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Remove Path Aliases
2+
3+
Date: 2025-10-23
4+
5+
Status: accepted
6+
7+
## Context
8+
9+
In [031-imports](./031-imports.md), we implemented path aliases using both the
10+
`"imports"` field in `package.json` and the `paths` field in `tsconfig.json`.
11+
This was done as a temporary solution because TypeScript didn't natively support
12+
the `"imports"` field, requiring us to maintain both configurations to get
13+
autocomplete and type checking.
14+
15+
However, TypeScript has now added native support for the `"imports"` field in
16+
`package.json` (as referenced in the original decision's "yet" link). This means
17+
we no longer need the `paths` configuration in `tsconfig.json` to get proper
18+
TypeScript support for our imports.
19+
20+
## Decision
21+
22+
We're removing the path aliases configuration from `tsconfig.json` and relying
23+
solely on the `"imports"` field in `package.json`. This simplifies our
24+
configuration and aligns with the standard Node.js approach.
25+
26+
The `"imports"` field will continue to work as before, providing the same import
27+
resolution functionality, but now with full TypeScript support without requiring
28+
duplicate configuration.
29+
30+
## Consequences
31+
32+
- **Simplified configuration**: We no longer need to maintain both
33+
`package.json` imports and `tsconfig.json` paths
34+
- **Standard compliance**: We're now using the standard Node.js approach without
35+
TypeScript-specific workarounds
36+
- **Reduced maintenance**: One less configuration to keep in sync
37+
- **Better tooling support**: TypeScript now natively understands the
38+
`"imports"` field, providing better IDE support
39+
40+
This supersedes [031-imports](./031-imports.md) as the current approach for
41+
handling imports in the Epic Stack.

0 commit comments

Comments
 (0)