Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

config.js vs preview.js for storybook?

Tags:

storybook

On the storybook website, they describe customizing your configuration using files named preview.js and main.js.

At the company I work at, it seems like the .storybook directory seems to contain a bunch of files with other names, like a webpack.config.js or even just config.js.

Does it not matter what you name the files in the .storybook directory? Does it just run all of them arbitrarily?

like image 622
temporary_user_name Avatar asked Oct 27 '25 07:10

temporary_user_name


1 Answers

The file names very much matter. What is happening is that your project is using the older standard (though it's still compatible) and the file names have been changed since Storybook 5.3. I understand it can be confusing, but the information available in the migration guide should help.

like image 80
Yann Braga Avatar answered Oct 29 '25 05:10

Yann Braga



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!