Search code examples
webpackvitestorybookrollup

Storybook asks me to choose if my project is using Vite or Webpack 5, but I am using Rollup


I am trying to build my first component library. Following a guide, I've simply initiatd a new empty npm project added rollup as the builder and started adding all my components in the src directory (in the components folder).

When trying to ad Storybook, it says: We were not able to detect the right builder for your project. Please select one: and lets me choose between Vite or Webpack 5, but it's neither. What should I do? Should one of them work better than the other? Would they both cause issues?


Solution

  • Vite is using rollup for production build, so its preferred to choose Vite

    ref: https://ruslan.rocks/posts/vite-vs-rollup#:~:text=Vite%20uses%20Rollup%20for%20production,to%20create%20production-ready%20bundles.