Skip to content

Latest commit

 

History

History
26 lines (17 loc) · 786 Bytes

main-config-preview-annotations.md

File metadata and controls

26 lines (17 loc) · 786 Bytes
title
previewAnnotations

Parent: main.js|ts configuration

Type: string[] | ((config: string[], options: Options) => string[] | Promise<string[]>)

Add additional scripts to run in the story preview.

Mostly used by frameworks. Storybook users and addon authors should add scripts to preview.js instead.

// @storybook/nextjs framework's src/preset.ts

import type { StorybookConfig } from './types';

export const previewAnnotations: StorybookConfig['previewAnnotations'] = (entry = []) => [
  ...entry,
  require.resolve('@storybook/nextjs/preview.js'),
];