JSPM

@storybook/csf-plugin

0.0.0-pr-24165-sha-acaa9f93
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 5816195
  • Score
    100M100P100Q212211F
  • License MIT

Enrich CSF files via static analysis

Package Exports

  • @storybook/csf-plugin
  • @storybook/csf-plugin/package.json

Readme

CSF Plugin

The CSF plugin reads CSF files and enriches their content via static analysis. It supports Webpack, Vite, and other bundlers using unplugin.

Source snippets

CSF plugin can add static source snippets to each story. For example:

export const Basic = () => <Button />;

Would be transformed to:

export const Basic = () => <Button />;
Basic.parameters = {
  storySource: {
    source: '() => <Button />',
  },
  ...Basic.parameters,
};

This allows @storybook/addon-docs to display the static source snippet.