From eae6bbe015189c2eeeec542696b36334aa35ae19 Mon Sep 17 00:00:00 2001 From: Jack Westbrook Date: Tue, 13 Jan 2026 15:35:17 +0100 Subject: [PATCH] fix(flamegraph): add webpack config for customconditions support --- packages/grafana-flamegraph/.storybook/main.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/packages/grafana-flamegraph/.storybook/main.ts b/packages/grafana-flamegraph/.storybook/main.ts index 5f950843923..5a91becc1ec 100644 --- a/packages/grafana-flamegraph/.storybook/main.ts +++ b/packages/grafana-flamegraph/.storybook/main.ts @@ -46,6 +46,16 @@ const config: StorybookConfig = { }) ); + // Tell storybook to resolve imports with the @grafana-app/source condition for + // the packages in this repo. + if (config && config.resolve) { + if (Array.isArray(config.resolve.conditionNames)) { + config.resolve.conditionNames.unshift('@grafana-app/source'); + } else { + config.resolve.conditionNames = ['@grafana-app/source', '...']; + } + } + return config; }, };