mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2025-12-25 11:20:07 +08:00
- Added Storybook scripts for development and building the UI components. - Updated package.json to include new dependencies for Storybook and styled-components. - Revised README to reflect changes in Tailwind CSS configuration, transitioning to v4 and removing the tailwind.config.js file. - Enhanced the tsdown configuration to mark additional peer dependencies as external. - Removed outdated Tailwind CSS configuration file to streamline the setup.
18 lines
567 B
TypeScript
18 lines
567 B
TypeScript
import type { StorybookConfig } from '@storybook/react-vite'
|
|
|
|
const config: StorybookConfig = {
|
|
stories: ['../stories/components/**/*.stories.@(js|jsx|ts|tsx)'],
|
|
addons: ['@storybook/addon-docs'],
|
|
framework: '@storybook/react-vite',
|
|
viteFinal: async (config) => {
|
|
const { mergeConfig } = await import('vite')
|
|
// 动态导入 @tailwindcss/vite 以避免 ESM/CJS 兼容性问题
|
|
const tailwindPlugin = (await import('@tailwindcss/vite')).default
|
|
return mergeConfig(config, {
|
|
plugins: [tailwindPlugin()]
|
|
})
|
|
}
|
|
}
|
|
|
|
export default config
|