Storybook 9.1 introduces a new module mocking system powered by sb.mock() that automatically mocks dependencies without requiring package.json changes or import path modifications. The system uses ahead-of-time transformation to rewrite dependency graphs before bundling, supporting both Vite and Webpack in development and
Table of contents
Introducing sb.mock()How to Use ItHow It Works: Ahead-of-Time TransformationTry It TodaySort: