-
-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
Single Configuration File - A.K.A. storybook.config.js - monoconfig #4169
Comments
All the |
Which one? I am not sure |
Re configuring addons, client side:
Only if the config is static though. If you e.g. want to register a react class or something, this is going to be tricky via a config file evaluated on the server. Maybe this is mostly fine though? |
Also, what about global parameters? Can we add that to the unknowns list @igor-dv? :) |
Global parameters? |
Sure, like import { addParameters } from '@storybook/react';
addParameters({ ... }); |
I think it's just one of the entries |
We are not doing this in v5 |
Working on this |
I'm having a customized story loader that will generate stories on the fly..., it will also do something like |
@leoyli that's something presets should be able to do. |
it should still be possible to use a storybook dir:
theme configuration, automatically gets passed through
favicon configuration (maybe should be an option of theme):
|
Are #6806 overlapped with this old issue?! |
let's discuss the "Single Configuration File" feature
I will update this template with the agreed changes. The inspiration is from here
API
The
storybook.config.js
will be at a root level, but we also may consider it to be configurable with the cli argumetns (for example for people that will have a few configurations).structure
storybook.config.js
exposes an objectstorybook.config.js
exposes a fuctionentries
Let's not call this field
stories
, because semantics will maybe changedglobs:
array of globs:
path to file:
combination
addons
An array of addons in the following structure:
We will register the addons by ourselves (no need of
addons.js
). The question is what to do with the addon's defaults, for example with what we setup today inconfig.js
? we can use the same pattern as inpresets
🤷♂️presets
array of strings
array of objects
combination
webpack
object
Will be merged to the final SB webpack config
function
Like today, but we may change if something is redundnat
babel
same as for
webpack
object
Will be merged to the final SB babel config
function
things to cover
tsconfig.json
to be set in.storybook
dir, only for angular app. How we will configure this ? maybe withpresets
? IDKdeprecations:
./storybook
dir@storybook/app
api, like aconfigure
method, that is used inconfig.js
The text was updated successfully, but these errors were encountered: