Skip to content

[Bug]: Slow initial page loading since upgrade to v7, taking more than one minute to download chunks #22164

Closed as not planned

Description

Describe the bug

I'm using Storybook 7.0.6 for react-vite, and since migrating from 6.5 to 7.0.6, I'm experiencing a very slow page loading time.
When I look at the network panel in Chrome, I see that the server is waiting for a long time (usually around 1 minute) before finally sending chunks that weight only a few kb.

storybook-waiting-for-server

storybook-waiting-for-server-detail

Not sure if it's related, but I've also this warnings in the console:

console-warning

To Reproduce

No response

System

Environment Info:

  System:
    OS: Linux 4.19 Debian GNU/Linux 10 (buster) 10 (buster)
    CPU: (12) x64 Intel(R) Core(TM) i7-9850H CPU @ 2.60GHz
  Binaries:
    Node: 18.14.1 - ~/.nvm/versions/node/v18.14.1/bin/node
    Yarn: 3.2.3 - /usr/bin/yarn
    npm: 9.3.1 - ~/.nvm/versions/node/v18.14.1/bin/npm
  Browsers:
    Chrome: 112.0.5615.121
    Firefox: 102.10.0esr

Additional context

I've just upgraded my project from 6.5 to 7. It's a yarn mono repo with only two packages (design system implementation in react/vite and storybook).

And here's the main.ts file:

import type { StorybookConfig } from '@storybook/react-vite';
const config: StorybookConfig = {
  stories: [
    '../src/stories/**/*.stories.mdx',
    '../src/stories/**/*.stories.tsx',
  ],
  staticDirs: ['../public'],
  addons: [
    '@storybook/addon-essentials',
    '@storybook/addon-a11y',
  ],
  core: {
    builder: '@storybook/builder-vite',
    disableTelemetry: true, 
  },
  framework: {
    name: '@storybook/react-vite',
    options: {},
  },
  docs: {
    autodocs: true,
  },
};
export default config;

And my dependencies:

  "dependencies": {
    "@emotion/react": "11.10.6",
    "@emotion/styled": "11.10.6",
    "@company/design-system-react": "0.0.3-rc1",
    "@mui/material": "5.11.12",
    "react": "18.2.0",
    "react-dom": "18.2.0"
  },
"devDependencies": {
    "@babel/core": "7.21.0",
    "@mdx-js/react": "2.3.0",
    "@storybook/addon-a11y": "7.0.6",
    "@storybook/addon-actions": "7.0.6",
    "@storybook/addon-docs": "7.0.6",
    "@storybook/addon-essentials": "7.0.6",
    "@storybook/addon-interactions": "7.0.6",
    "@storybook/addon-viewport": "7.0.6",
    "@storybook/addons": "7.0.6",
    "@storybook/builder-vite": "^7.0.6",
    "@storybook/manager-api": "7.0.6",
    "@storybook/preview-api": "7.0.6",
    "@storybook/react": "7.0.6",
    "@storybook/react-vite": "7.0.6",
    "@storybook/testing-library": "0.1.0",
    "@storybook/theming": "7.0.6",
    "@types/react": "18.0.28",
    "@types/react-dom": "18.0.11",
    "@vitejs/plugin-react": "3.1.0",
    "babel-loader": "8.3.0",
    "eslint-plugin-storybook": "0.6.11",
    "storybook": "7.0.6",
    "typescript": "4.9.5",
    "vite": "4.1.3"
  }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions