babelDefault
¥Parent: main.js|ts configuration
类型:(config: Babel.Config, options: Options) => Babel.Config | Promise<Babel.Config>
¥Type: (config: Babel.Config, options: Options) => Babel.Config | Promise<Babel.Config>
babelDefault
允许自定义 Storybook 的 Babel 设置。在应用任何用户预设之前,它会应用于预览配置,这使其对 插件作者 有用且值得推荐,以便终端用户的 babel
设置可以覆盖它。
¥babelDefault
allows customization of Storybook's Babel setup. It is applied to the preview config before any user presets have been applied, which makes it useful and recommended for addon authors so that the end user's babel
setup can override it.
Babel.Config
Babel 提供的选项仅在你启用了 @storybook/addon-webpack5-compiler-babel
插件时才适用。
¥The options provided by Babel are only applicable if you've enabled the @storybook/addon-webpack5-compiler-babel
addon.
Options
类型:{ configType?: 'DEVELOPMENT' | 'PRODUCTION' }
¥Type: { configType?: 'DEVELOPMENT' | 'PRODUCTION' }
还有其他难以在此处记录的选项。请自省类型定义以获取更多信息。
¥There are other options that are difficult to document here. Please introspect the type definition for more information.