Commit d914f3a
committed
feat(stx): walk componentsDir recursively when resolving by tag name
The component tag resolver previously only descended one level into
componentsDir, so a component nested at e.g. `components/A/B/Foo.stx`
couldn't be auto-resolved by writing `<Foo />` — every page had to
add an explicit `import Foo from '...'` line in `<script server>`.
Replace the one-shot subdir walk with a depth-limited DFS (cap 8,
skip `node_modules`, skip dotdirs) so any depth of nesting under
componentsDir is reachable. Same first-match-wins semantics as
before; only the search frontier widens.
This unblocks auto-import for component trees like the Stacks
dashboard, where shared UI lives under
`resources/components/Dashboard/UI/...`.1 parent a49aaad commit d914f3a
1 file changed
Lines changed: 27 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
438 | 438 | | |
439 | 439 | | |
440 | 440 | | |
441 | | - | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
442 | 448 | | |
443 | 449 | | |
444 | 450 | | |
445 | | - | |
446 | 451 | | |
447 | 452 | | |
448 | 453 | | |
449 | | - | |
450 | | - | |
451 | | - | |
452 | | - | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
453 | 472 | | |
454 | 473 | | |
455 | 474 | | |
| |||
459 | 478 | | |
460 | 479 | | |
461 | 480 | | |
| 481 | + | |
462 | 482 | | |
463 | 483 | | |
464 | 484 | | |
465 | | - | |
| 485 | + | |
466 | 486 | | |
467 | 487 | | |
468 | 488 | | |
| |||
0 commit comments