Skip to content

Commit 4934f23

Browse files
committed
🤖 Add dedupe config for emotion packages in Storybook
Attempt to fix Chromatic build issue by ensuring emotion packages are properly deduplicated and resolved. This should prevent the 'styled is not a function' error in the Chromatic environment.
1 parent de9baa9 commit 4934f23

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

.storybook/main.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,12 @@ const config: StorybookConfig = {
5050
],
5151
};
5252

53+
// Ensure emotion packages are resolved correctly
54+
config.resolve = {
55+
...config.resolve,
56+
dedupe: ['@emotion/react', '@emotion/styled', '@emotion/cache'],
57+
};
58+
5359
return config;
5460
},
5561
};

0 commit comments

Comments
 (0)