Commit df0a03e
fix(widget): skip declaration bundling under Storybook build
Storybook's Vite builder loads vite.config.ts, so vite-plugin-dts ran during 'storybook build' and failed: api-extractor looked for dist/index.d.ts, which only the library build produces. Guard the dts plugin behind process.env.STORYBOOK so it runs only for the library build. Verified locally: 'pnpm build' still emits dist/index.d.ts (+ .d.cts) and 'pnpm build-storybook' now succeeds.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 73bae66 commit df0a03e
1 file changed
Lines changed: 25 additions & 17 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
26 | 34 | | |
27 | 35 | | |
28 | 36 | | |
| |||
0 commit comments