Skip to content
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

Main.js config: Combine presets and register entries in addons field #9245

Closed
shilman opened this issue Dec 25, 2019 · 1 comment
Closed
Labels
maintenance User-facing maintenance tasks
Milestone

Comments

@shilman
Copy link
Member

shilman commented Dec 25, 2019

Before: Presets are a “superset” of addons

  • Addons are packages that extend Storybook’s UI (but not always, e.g. Storyshots). They sometimes use a mechanism called presets to configure storybook and/or register themselves (e.g. Docs)
  • Presets are both packages that configure Storybook and also a mechanism by which addons can configure Storybook.
module.exports = {
  presets: [‘@storybook/addon-docs/preset’, { name: '@storybook/preset-create-react-app', options: {} }],
  addons: [‘some-addon-we-dont-own/register’, ...],
  ...
}

After: Addons are a “superset” of presets

  • Addons are packages that extend Storybook in various ways (UI, binaries, libraries, configurations)
  • Presets are THE mechanism by which addons configure Storybook, including registering themselves with Storybook.
module.exports = {
  addons: [
    ‘@storybook/addon-docs/preset’,
     { name: '@storybook/addon-create-react-app', options: {} }
    ‘some-addon-we-dont-own/register’,
    ...
  ],
}
@shilman
Copy link
Member Author

shilman commented Dec 31, 2019

Yee-haw!! I just released https://github.com/storybookjs/storybook/releases/tag/v5.3.0-rc.6 containing PR #9246 that references this issue. Upgrade today to try it out!

You can find this prerelease on the @next NPM tag.

Closing this issue. Please re-open if you think there's still more to do.

@shilman shilman closed this as completed Dec 31, 2019
@shilman shilman added this to the 5.3.0 milestone Dec 31, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance User-facing maintenance tasks
Projects
None yet
Development

No branches or pull requests

1 participant