storybook/docs/snippets/common/storybook-telemetry-main-enable-crash-reports.main-ts.ts.mdx
2023-01-19 17:45:34 +00:00

26 lines
661 B
Plaintext

```ts
// .storybook/main.ts
// Replace your-framework with the framework you are using (e.g., react-webpack5, vue3-webpack5)
import type { StorybookConfig } from '@storybook/types';
const config: StorybookConfig = {
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|ts|tsx)'],
addons: [
'@storybook/addon-links',
'@storybook/addon-essentials',
'@storybook/addon-interactions',
'@storybook/preset-create-react-app',
],
framework: {
name: '@storybook/react-webpack5',
options: {},
},
core: {
enableCrashReports: true, // 👈 Appends the crash reports to the telemetry events
},
};
export default config;
```