storybook/docs/api/main-config-preview-body.md
Kyle Gach 1d3262ee62 Address comments:
- Add `babelDefault` and `managerHead` pages
- Fix broken links
- Clarify when some properties are primarily used by addon authors
- Document simplified options for `babel`, `babelDefault`, `viteFinal`, and `webpackFinal`
- Add description for `core.channelOptions`
- Remove the `previewMainTemplate` page
- Document possible shortcomings of some `stories` configurations
- Document limitations of some `typescript` options
2023-05-23 14:15:53 -06:00

792 B

title
previewBody

Parent: main.js|ts configuration

Type: (body: string) => string

Programmatically adjust the preview <body> of your Storybook. Most often used by addon authors.

💡 If you don't need to programmatically adjust the preview body, you can add scripts and styles to preview-body.html instead.

For example, you can conditionally add scripts or styles, depending on the environment:

<CodeSnippets paths={[ 'common/main-config-preview-body.js.mdx', 'common/main-config-preview-body.ts.mdx', ]} />