From c1d07d6424c443249ccdea3e2bd0e56919f6386c Mon Sep 17 00:00:00 2001 From: Christian Byrne Date: Fri, 20 Feb 2026 19:03:06 -0800 Subject: [PATCH] fix: restore strictExecutionOrder for Storybook Chromatic builds (#9038) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## 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) --- .storybook/main.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.storybook/main.ts b/.storybook/main.ts index 68e22b283..0c576b0bd 100644 --- a/.storybook/main.ts +++ b/.storybook/main.ts @@ -100,7 +100,8 @@ const config: StorybookConfig = { rolldownOptions: { treeshake: false, output: { - keepNames: true + keepNames: true, + strictExecutionOrder: true }, onwarn: (warning, warn) => { // Suppress specific warnings