Last active
November 30, 2022 18:43
-
-
Save mihkeleidast/af2e01ee4672804ed79d903a1093a7ab to your computer and use it in GitHub Desktop.
.storybook/main.ts after migration
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 { vanillaExtractPlugin } from '@vanilla-extract/vite-plugin'; | |
import { mergeConfig } from 'vite'; | |
const config: StorybookViteConfig = { | |
stories: ['../**/*.stories.mdx'], | |
addons: [ | |
'./theme-addon/preset.ts', | |
'@storybook/addon-actions', | |
'@storybook/addon-a11y', | |
'@storybook/addon-measure', | |
'@storybook/addon-outline', | |
{ | |
name: '@storybook/addon-docs', | |
options: { | |
transcludeMarkdown: true, | |
}, | |
}, | |
'@storybook/addon-controls', | |
], | |
framework: '@storybook/react', | |
staticDirs: ['./static', { from: '../../design-tokens/build/figma', to: '/tokens' }], | |
typescript: { | |
check: true, | |
checkOptions: { | |
// hide type errors in third party types in node_modules | |
reportFiles: ['src/**/*.{ts,tsx}'], | |
}, | |
}, | |
core: { | |
builder: '@storybook/builder-vite', | |
}, | |
features: { | |
storyStoreV7: true, | |
}, | |
async viteFinal(config) { | |
return mergeConfig(config, { | |
base: './', | |
plugins: [vanillaExtractPlugin()], | |
}); | |
}, | |
}; | |
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
import type { StorybookViteConfig } from '@storybook/builder-vite'; | |
import { vanillaExtractPlugin } from '@vanilla-extract/vite-plugin'; | |
import { mergeConfig } from 'vite'; | |
const config: StorybookViteConfig = { | |
stories: ['../**/*.stories.@(ts|tsx|js|jsx|mdx)'], | |
addons: ['./theme-addon/preset.ts', '@storybook/addon-actions', '@storybook/addon-a11y', '@storybook/addon-measure', '@storybook/addon-outline', { | |
name: '@storybook/addon-docs', | |
options: { | |
transcludeMarkdown: true | |
} | |
}, '@storybook/addon-controls'], | |
framework: '@storybook/react', | |
staticDirs: ['./static', { | |
from: '../../design-tokens/build/figma', | |
to: '/tokens' | |
}], | |
typescript: { | |
check: true, | |
checkOptions: { | |
// hide type errors in third party types in node_modules | |
reportFiles: ['src/**/*.{ts,tsx}'] | |
} | |
}, | |
core: { | |
builder: '@storybook/builder-vite' | |
}, | |
features: { | |
storyStoreV7: true | |
}, | |
async viteFinal(config) { | |
return mergeConfig(config, { | |
base: './', | |
plugins: [vanillaExtractPlugin()] | |
}); | |
} | |
}; | |
export default config; | |
export const framework = '@storybook/react'; | |
export const framework = { | |
name: '@storybook/react-webpack5', | |
options: {} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment