-
Notifications
You must be signed in to change notification settings - Fork 106
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Backgrounds Addon custom values not working #62
Comments
I did a little bit of investigation, and it looks like we are missing some logic that the webpack builders have to sort the entries so that default addon configs come before the user's preview.js (https://github.com/storybookjs/storybook/blob/e8e4ca7709d975150fa48d7dad5db4e01ea6c9c5/lib/builder-webpack5/src/preview/entries.ts#L8-L28). Since we don't have that, the |
Yes, I think we'll need to find a solution to this, it's a pretty serious problem. :-/ |
When using the vite builder the
values
array is ignored when customizing the backgrounds addon configuration, thedefault
key works fine.I'm using this config:
I get this error in the console when using the vite builder with this configuration
If I disable the vite builder by commenting the
core": { "builder": "storybook-builder-vite" }
line in main.js the addon works as expected, the "white" color is present and is the default.Repo showing the bug: https://github.com/giubatt/sb-vite-background
I created a vite project from scratch, added storybook with vite builder and added the backgrounds addon config.
The text was updated successfully, but these errors were encountered: