The new discovery mechanism for code components used by @drupal-canvas/cli supports to different naming styles:
index-style component
src/components/hero/
index.tsx
component.yml
named component
src/
card.tsx
card.component.yml
Both work well in Workbench, but the push commands behaves incorrectly when the named component style is used in a codebase: It overrides all components in Canvas with the first one it founds.
Codebase to reproduce:
npx @drupal-canvas/create@latest --template https://github.com/balintbrews/canvas-starter.git --ref a34b580bc3339e7a5b15e212a0fe4dcf799863fc
Comments
Comment #2
balintbrewsReducing priority to Normal, because both templates in Drupal Canvas Create use the index-style naming, and also all Canvas agentic skills are written for that style.
Comment #3
nagwani commentedComment #4
balintbrewsComment #6
balintbrewsI fixed this while working on #3588661: Make CLI builds use shared Vite infrastructure, and apparently didn't manage to separate the fix from that branch.