vite-plugin-turbosnap v1.0.3 generates a preview-stats.json file from Vite Storybook projects for Chromatic's Turbosnap feature, which limits snapshot runs to only changed stories. It works by constructing a dependency graph during Vite builds, mimicking webpack stats output for Chromatic CLI. Requires chromatic-cli >=6.5.0, Storybook >=7.0 (or 6.5 with @storybook/builder-vite >=0.1.22). Experimental; may not support all configurations.
npm install vite-plugin-turbosnapVerified import paths — ran on the pinned version, not inferred.
Basic setup to add the turbosnap plugin only during production builds in Storybook's viteFinal config.
Conditionally apply plugin only when configType === 'PRODUCTION' as shown in the quickstart.
Set rootDir to the monorepo package root, e.g., path.resolve(__dirname, '..').
Run build-storybook to generate the file for Chromatic.
Ensure the import is correct: import turbosnap from 'vite-plugin-turbosnap'; then use turbosnap({...}) in the plugins array.Run npm install --save-dev vite-plugin-turbosnap and ensure node_modules path is correct.
No dependency data recorded yet.