0
0
mirror of https://github.com/PostHog/posthog.git synced 2024-11-22 08:40:03 +01:00
posthog/.storybook/main.ts
Marius Andra 8075e42879
chore(storybook): upgrade storybook to 7.3 (#17078)
* feat(kea): typegen path cleanup and delete unused files

* bump

* 3.2.2

* typegen upgrade to 3.3.0

* storybook 7.3

* upgrade storybook to 7.3

* try using #storybook-root instead of #root

* try using #storybook-root instead of #root (2)

* try using #storybook-root instead of #root (3)

* try using #storybook-root instead of #root (4)

* switch out argTypes.defaultValue with args

* Update UI snapshots for `chromium` (1)

* Update UI snapshots for `chromium` (2)

* Update UI snapshots for `chromium` (1)

* Update UI snapshots for `chromium` (1)

---------

Co-authored-by: Thomas Obermüller <thomas.obermueller@gmail.com>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2023-08-21 09:32:49 +02:00

50 lines
1.3 KiB
TypeScript

import { createEntry } from '../webpack.config'
import { StorybookConfig } from '@storybook/react-webpack5'
const config: StorybookConfig = {
stories: ['../frontend/src/**/*.stories.@(js|jsx|ts|tsx|mdx)'],
addons: [
'@storybook/addon-docs',
'@storybook/addon-links',
'@storybook/addon-essentials',
'@storybook/addon-storysource',
'@storybook/addon-a11y',
'storybook-addon-pseudo-states',
],
staticDirs: ['public'],
webpackFinal: (config) => {
const mainConfig = createEntry('main')
return {
...config,
resolve: {
...config.resolve,
extensions: [...config.resolve!.extensions!, ...mainConfig.resolve.extensions],
alias: { ...config.resolve!.alias, ...mainConfig.resolve.alias },
},
module: {
...config.module,
rules: [
...mainConfig.module.rules,
...(config.module?.rules?.filter(
(rule: any) => 'test' in rule && rule.test.toString().includes('.mdx')
) ?? []),
],
},
}
},
framework: {
name: '@storybook/react-webpack5',
options: {},
},
docs: {
autodocs: 'tag',
},
}
export default config