Skip to content

Preset entry

Storybook loads storybook-addon-vis/preset when you add the addon to .storybook/main.ts. You do not import it yourself.

It exports experimental_serverChannel, a Storybook server hook. The hook answers the panel’s requests:

  1. The panel sends a request with the story name and import path.
  2. The server globs the baseline, result and diff images for each project in visProjects.
  3. It sends the images back on the same channel.

The visProjects it reads are the addon options. Without them it uses the default snapshot root. The panel is described in The Vis panel.

The name carries the experimental_ prefix because Storybook defines the hook as experimental.