Created
May 19, 2022 13:30
-
-
Save ygkn/34cc65827247cc8ff30f86d81b0eedb8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import type { StorybookViteConfig } from '@storybook/builder-vite'; | |
import { mergeConfig } from 'vite'; | |
import viteConfig from '../vite.config'; | |
const config: StorybookViteConfig = { | |
core: { builder: '@storybook/builder-vite' }, | |
stories: ['../src/**/*.stories.@(ts|tsx)'], | |
addons: [ | |
'@storybook/addon-links', | |
'@storybook/addon-essentials', | |
'@storybook/addon-interactions', | |
], | |
framework: '@storybook/react', | |
features: { storyStoreV7: true }, | |
async viteFinal(config) { | |
return mergeConfig(mergeConfig(config, viteConfig), { | |
define: { | |
global: 'window', | |
}, | |
}); | |
}, | |
}; | |
export default config; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export const parameters = { | |
actions: { argTypesRegex: "^on[A-Z].*" }, | |
controls: { | |
matchers: { | |
color: /(background|color)$/i, | |
date: /Date$/, | |
}, | |
}, | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment