Commit 709ef98
feat: mode-aware component autoloader for built (.js) vs source (.ts)
Phase 2 of dual-runtime support. globLoader and API.loadLocalConfig now
match both TypeScript sources (.ts/.tsx — the dev/source layout) and
compiled JavaScript (.js/.mjs/.cjs — the built dist/ layout a plain-Node
consumer runs), skip declaration files (.d.ts), and dedupe by basename so
a stray compiled .js next to its .ts source can't double-instantiate.
In dev only .ts is present, so loading order/behavior is unchanged: full
suite (54 files / 777 tests) still passes on Bun.
Asset + scaffold-source path resolution (packageRoot/scaffoldSourceRoot)
is deferred to the build-step PR, where it can be validated against the
real tsup output layout.
Part of #488
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 83c66d4 commit 709ef98
2 files changed
Lines changed: 24 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
198 | 198 | | |
199 | 199 | | |
200 | 200 | | |
201 | | - | |
202 | | - | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
203 | 209 | | |
204 | 210 | | |
205 | 211 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
8 | | - | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
9 | 15 | | |
10 | 16 | | |
11 | 17 | | |
| |||
17 | 23 | | |
18 | 24 | | |
19 | 25 | | |
20 | | - | |
21 | | - | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
22 | 34 | | |
23 | 35 | | |
24 | 36 | | |
| |||
0 commit comments