-
-
Notifications
You must be signed in to change notification settings - Fork 9.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #22818 from storybookjs/main-prerelease
Merge pull request #22539 from storybookjs/api-reference-main-config
- Loading branch information
Showing
184 changed files
with
2,424 additions
and
808 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
--- | ||
title: 'addons' | ||
--- | ||
|
||
Parent: [main.js|ts configuration](./main-config.md) | ||
|
||
Type: `(string | { name: string; options?: AddonOptions })[]` | ||
|
||
Registers the [addons](../addons/install-addons.md) loaded by Storybook. | ||
|
||
For each addon's available options, see their respective [documentation](https://storybook.js.org/integrations). | ||
|
||
<!-- prettier-ignore-start --> | ||
|
||
<CodeSnippets | ||
paths={[ | ||
'common/main-config-addons.js.mdx', | ||
'common/main-config-addons.ts.mdx', | ||
]} | ||
/> | ||
|
||
<!-- prettier-ignore-end --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
--- | ||
title: 'babelDefault' | ||
--- | ||
|
||
Parent: [main.js|ts configuration](./main-config.md) | ||
|
||
Type: `(config: Babel.Config, options: Options) => Babel.Config | Promise<Babel.Config>` | ||
|
||
`babelDefault` allows customization of Storybook's [Babel](https://babeljs.io/) setup. It is applied to the preview config before any user presets have been applied, which makes it useful and recommended for [addon authors](../addons/writing-presets.md#babel) so that the end user's [`babel`](./main-config-babel.md) setup can override it. | ||
|
||
<div class="aside"> | ||
|
||
💡 To adjust your Storybook's Babel setup directly—not via an addon—use [`babel`](./main-config-babel.md) instead. | ||
|
||
</div> | ||
|
||
<!-- prettier-ignore-start --> | ||
|
||
<CodeSnippets | ||
paths={[ | ||
'common/storybook-babel-configuration-example.ts.mdx', | ||
]} | ||
/> | ||
|
||
<!-- prettier-ignore-end --> | ||
|
||
## `Babel.Config` | ||
|
||
See [Babel docs](https://babeljs.io/docs/options). | ||
|
||
## `Options` | ||
|
||
Type: `{ configType?: 'DEVELOPMENT' | 'PRODUCTION' }` | ||
|
||
There are other options that are difficult to document here. Please introspect the type definition for more information. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
--- | ||
title: 'babel' | ||
--- | ||
|
||
Parent: [main.js|ts configuration](./main-config.md) | ||
|
||
Type: `(config: Babel.Config, options: Options) => Babel.Config | Promise<Babel.Config>` | ||
|
||
Customize Storybook's [Babel](https://babeljs.io/) setup. | ||
|
||
<div class="aside"> | ||
|
||
💡 [Addon authors](../addons/writing-presets.md#babel) should use [`babelDefault`](./main-config-babel-default.md) instead, which is applied to the preview config before any user presets have been applied. | ||
|
||
</div> | ||
|
||
<!-- prettier-ignore-start --> | ||
|
||
<CodeSnippets | ||
paths={[ | ||
'common/main-config-babel.js.mdx', | ||
'common/main-config-babel.ts.mdx', | ||
]} | ||
/> | ||
|
||
<!-- prettier-ignore-end --> | ||
|
||
## `Babel.Config` | ||
|
||
See [Babel docs](https://babeljs.io/docs/options). | ||
|
||
## `Options` | ||
|
||
Type: `{ configType?: 'DEVELOPMENT' | 'PRODUCTION' }` | ||
|
||
There are other options that are difficult to document here. Please introspect the type definition for more information. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
title: 'config' | ||
--- | ||
|
||
Parent: [main.js|ts configuration](./main-config.md) | ||
|
||
Type: `string[] | ((config: string[], options: Options) => string[] | Promise<string[]>)` | ||
|
||
Deprecated: `true` | ||
|
||
Add additional scripts to run in the story preview. Deprecated in favor of [`previewAnnotations`](./main-config-preview-annotations.md). |
Oops, something went wrong.