Skip to content

Storybook 10: ESM-only, module automocking, and CSF Factories

Insight: Storybook 10 is ESM-only (dropping CommonJS), reducing install size by 29% on top of Storybook 9's 50% savings. Key new features: sb.mock for module automocking (inspired by vi.mock but works with both Vite and Webpack), and CSF Factories promoted to Preview status — providing better TypeScript type safety, ergonomics, and autocompletion. Experimental: test syntax for reduced sidebar clutter and React Server Component testing.

Detail: CSF Factories are the next major iteration of Component Story Format, reducing boilerplate and eliminating type assignments. They are expected to become the default in Storybook 11 (Spring 2026). The sb.mock collaboration with Vitest creates a next-generation module mocking solution that is simpler than the Storybook 9 approach and works in both development and production builds. Requires Node 20.16+, 22.19+, or 24+.

Sources

Related: existing entry "Storybook 9 beta — component testing becomes the core workflow" in external/design-systems.md — SUPERSEDES