JSPM

@storybook/csf-plugin

9.0.0-alpha.2
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 5816195
  • Score
    100M100P100Q212204F
  • License MIT

Enrich CSF files via static analysis

Package Exports

    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.