storybook/docs/api/main-config-babel.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

900 B

title
babel

Parent: main.js|ts configuration

Type: (config: Babel.Config, options: Options) => Babel.Config | Promise<Babel.Config>

Customize Storybook's Babel setup.

💡 Addon authors should use babelDefault instead, which is applied to the preview config before any user presets have been applied.

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

Babel.Config

See Babel docs.

Options

Type: { configType?: 'DEVELOPMENT' | 'PRODUCTION' }

There are other options that are difficult to document here. Please introspect the type definition for more information.