#build-storybook unreasonably slow (45 minutes)

11 messages · Page 1 of 1 (latest)

echo blade
#

As part of our testing pipeline, we run build-storybook. However, this takes about 45 minutes, which is just too long to remain practical. Note that build-storybook also takes a very long time on my local machine.

I'm looking for possible mitigations or solutions.
For example, is there some feature that is known to increase building time that we could do without?
Or is there some way to allow for caching of builds?

Further context:
Version: 7.0.5 (issue was also present on v7.0.2)
Amount of stories: About 50
Addons: [ '@storybook/addon-links', '@storybook/addon-essentials', '@storybook/addon-interactions', "@storybook/addon-styling"]
Using React and typescript
We also use 2 global decorators

echo blade
#

Extra context: We're using vite as builder

bold sable
#

damn I'm also having this problem but nobody knows the answer?

past wraith
#

@bold sable Do you have a minimal repro by any chance?

#

@modest otter I'm wondering if it could be related to the docgen changes we made? I can only imagine tsc being so slow.

echo blade
#

We've just managed to solve this issue by ourselves

#

After after updating all our storybook dependencies to the newest version, building time was reduced to 1 minute

#

Concrete changes to devDependencies in our package.json:

    "@storybook/addon-essentials": "^7.0.5",
    "@storybook/addon-interactions": "^7.0.5",
    "@storybook/addon-links": "^7.0.5",
    "@storybook/addon-postcss": "^2.0.0",
    "@storybook/addon-styling": "^0.3.2",
    "@storybook/blocks": "^7.0.5",
    "@storybook/jest": "^0.0.10",
    "@storybook/react": "^7.0.5",
    "@storybook/react-vite": "^7.0.5",
    "@storybook/test-runner": "^0.10.0",
past wraith
bold sable
past wraith
#

@cold knot @brittle ice I thought we had plan to improve this right? Checking that all deps are using the same version when running sb dev