Skip to content

Commit dc0f57b

Browse files
iOvergaardclaude
andcommitted
docs(build): document componentEntries glob in vite.config.ts
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent ce3451e commit dc0f57b

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

vite.config.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@ import { globSync } from 'node:fs';
22
import { defineConfig } from 'vitest/config';
33
import { playwright } from '@vitest/browser-playwright';
44

5+
// Explicit entry points for every component registration file and the components barrel.
6+
// Registration files follow the naming convention {name}/{name}.ts (e.g. button/button.ts),
7+
// which distinguishes them from button.element.ts, button.story.ts, and button.test.ts.
8+
// These entries are required so Rolldown preserves the exports of each registration file —
9+
// without them, Rolldown strips re-exports it considers redundant (since the element class is
10+
// also reachable via button.element.js), breaking the cherry-pick import pattern.
511
const componentEntries = Object.fromEntries(
612
[
713
'src/components/index.ts',

0 commit comments

Comments
 (0)