Closed mdesilva closed 1 year ago
@mdesilva could you try combining the two parameters objects you have there...
const preview: Preview = {
parameters: {
actions: { argTypesRegex: "^on[A-Z].*" },
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/,
},
},
cssVariables: {
files: {
"Sports": SportsTheme,
"Nation": NationTheme
}
}
},
};
@DanWebb Yep I realized this shortly after posting the question. Thank you.
I experienced the same issue when upgrading storybook to v8. The fix was to introduce a new parameters
key instead of directly exporting the object.
e.g.
This is not going to work.
export const parameters: {
...
}
This will work.
export const parameters: {
parameters: {
...
}
}
I am getting the above error even though I have
parameters
andfiles
defined. My preview.ts is as follows:FYI: The css files are being imported correctly as I tell webpack to use css-loader to import css files as modules, and if I make a css syntax mistake on purpose Storybook tells me about that error first. After I resolve that error, the above error pops up.