A Storybook builder plugin for Vite targeting Vue 2 projects, version 0.1.32. It enables using Vite as the bundler for Storybook instead of Webpack, providing fast startup times and instant HMR. Requires Vite >=2.6.7 and Storybook >=6.4.0. Key differentiator: specifically designed for Vue 2, not compatible with Vue 3 or other frameworks. Note: does not read vite.config.js by default; configuration must be done via viteFinal hook. Known limitations: full page reload on story file changes, prebundling issues in Storybook context.
npm install storybook-builder-vite-vue2No compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Configures Storybook with the Vite builder for a Vue 2 project, showing how to set the builder and customize Vite config via viteFinal.
Remove @storybook/manager-webpack5 if installed. The builder only works with manager-webpack4 (default).
Use viteFinal in .storybook/main.js to merge custom Vite config.
No workaround; known limitation. Ensure component files are separate from story files.
In viteFinal, add to config.optimizeDeps.include: ['dependency-name'].
Ensure story files have the .stories.tsx extension, even for Vue 2.
Run npm install storybook-builder-vite-vue2 --save-dev (or yarn/pnpm equivalent).
Export a function via module.exports = { viteFinal: async (config, options) => { ... } }Ensure Storybook >=6.4.0 and that core.builder is set to 'storybook-builder-vite-vue2' in main.js.