[Bug]: Storybook 在加载组件后崩溃

b1uwtaje  于 3个月前  发布在  其他
关注(0)|答案(3)|浏览(54)

描述bug

组件加载后崩溃

colors-docs-storybook-mozilla-firefox-2023-08-28-22-36-07_oGnzc18r.mp4

重现步骤

组件渲染后
main.ts ->

const config: StorybookConfig = {
    stories: ['../../src/**/*.stories.@(js|jsx|mdx|ts|tsx)'],
    staticDirs: ['../../public'],
    addons: [
        '@storybook/addon-links',
        '@storybook/addon-essentials',
        '@storybook/addon-interactions',
        '@storybook/theming',
        {
            name: '@storybook/addon-coverage',
            options: {
                istanbul: {
                    ...coverageConfig,
                },
            },
        },
        '@storybook/addon-storysource',
        '@storybook/addon-a11y',
        '@whitespace/storybook-addon-html',
        '@bbbtech/storybook-formik/register',
        '@geometricpanda/storybook-addon-badges',
        '@storybook/addon-designs',
        'storybook-css-modules',
        'storybook-react-i18next',
        'storybook-addon-mock',
    ],
    framework: {
        name: '@storybook/react-vite', 
        options: {
            builder: {
                viteConfigPath: './vite.config.ts',
            },
        },
    },
    core: {
        builder: '@storybook/builder-vite',
    },
    typescript: {
        reactDocgen: 'react-docgen', 
    },
    async viteFinal(config, { configType }) {
        return mergeConfig(config, {
            resolve: {
                alias: {
                    '~': path.resolve(__dirname, '../../src'),
                },
            },
        });
    },
};

系统信息

node - v18.17.1
npm - 9.6.7
react - 18.2.0
@storybook/addon-a11y - 7.3.2
@storybook/addon-actions - 7.3.2
@storybook/addon-coverage - 0.0.9
@storybook/addon-designs - 7.0.5
@storybook/addon-essentials - 7.3.2
@storybook/addon-interactions - 7.3.2
@storybook/addon-links - 7.3.2
@storybook/addon-storyshots - 7.3.2
@storybook/addon-storyshots-puppeteer - 7.3.2
@storybook/addon-storysource - 7.3.2
@storybook/addon-styling - 1.3.7
@storybook/builder-vite - 7.3.2
@storybook/builder-webpack5 - 7.3.2
@storybook/cli - 7.3.2
@storybook/jest - 0.2.1
@storybook/manager-api - 7.3.2
@storybook/manager-webpack5 - 6.5.16
@storybook/react - 7.3.2
@storybook/react-vite - 7.3.2
@storybook/test-runner - 0.13.0
@storybook/testing-library - 0.2.0
@storybook/theming - 7.3.2
storybook-addon-mock - 4.2.1
storybook-addon-sass-postcss - 0.1.3
storybook-addon-themes - 6.1.0
storybook-css-modules - 1.0.8
storybook-react-i18next - 2.0.8
typescript - 4.7.4
vite - 4.4.9

其他上下文信息

  • 无响应*
iklwldmw

iklwldmw1#

你好,感谢你报告这个问题。你能分享一个复现的例子吗?我们优先处理有复现的bug报告。谢谢!

vcirk6k6

vcirk6k62#

我无法做到,因为我的仓库是私有的。但我会尝试在今天或明天复现这个仓库。

相关问题