文档
Storybook 文档

logLevel

父级: main.js|ts 配置

类型: 'debug' | 'error' | 'info' | 'trace' | 'warn'

默认: 'info'

配置 Storybook 在浏览器终端中的日志。对调试很有用。

.storybook/main.ts
// Replace your-framework with the framework you are using (e.g., react-webpack5, vue3-vite)
import type { StorybookConfig } from '@storybook/your-framework';
 
const config: StorybookConfig = {
  framework: '@storybook/your-framework',
  stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
  logLevel: 'debug',
};
 
export default config;