Skip to content

Commit c1d07d6

Browse files
fix: restore strictExecutionOrder for Storybook Chromatic builds (#9038)
## Summary Restore `strictExecutionOrder: true` in `.storybook/main.ts` rolldownOptions, accidentally removed in #8834 as a merge artifact. ## Problem Chromatic visual regression tests fail on `version-bump-*` release branches with: ``` Error: __STORYBOOK_MODULE_CORE_EVENTS_PREVIEW_ERRORS__ is not defined ``` Rolldown without `strictExecutionOrder` doesn't guarantee module execution order. Storybook's internal module system defines `__STORYBOOK_MODULE_*` globals during initialization — without strict ordering, downstream code references them before they're defined. Only `version-bump-*` branches are affected because the `chromatic-deployment` CI job (which actually loads and extracts stories at runtime) is gated to those branches. ## Changes - Restore `strictExecutionOrder: true` in `.storybook/main.ts` rolldownOptions output config ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-9038-fix-restore-strictExecutionOrder-for-Storybook-Chromatic-builds-30e6d73d365081489c53cea131b97a2f) by [Unito](https://www.unito.io)
1 parent 4e9e3a0 commit c1d07d6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

.storybook/main.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,8 @@ const config: StorybookConfig = {
100100
rolldownOptions: {
101101
treeshake: false,
102102
output: {
103-
keepNames: true
103+
keepNames: true,
104+
strictExecutionOrder: true
104105
},
105106
onwarn: (warning, warn) => {
106107
// Suppress specific warnings

0 commit comments

Comments
 (0)