Skip to content

Integrate with @storybook/addon-coverage #41

@BartWaardenburg

Description

@BartWaardenburg

Why

@storybook/addon-coverage already wraps istanbul-lib-instrument (webpack builder) and vite-plugin-istanbul (Vite builder), with auto-detection. Threading an instrumenter option through the addon plumbing would let Storybook users adopt oxc-coverage without code changes once both upstream layers are configured.

Scope

  1. Investigate whether the addon can pass through a custom instrumenter to both the webpack and Vite paths, or whether the addon's coverage option needs a new field.
  2. Open an upstream feature PR adding coverage.instrumenter (or equivalent) that delegates to the underlying provider.
  3. Add a README section under "Coverage stack" with a copy-paste Storybook config example.

Acceptance criteria

  • Storybook story coverage produces matching output between the default and the oxc-coverage instrumenter
  • Upstream PR opened in storybookjs/addon-coverage
  • README example added

Notes

The Vite path already works today via the existing vite-plugin-istanbul 9.0.0 integration; the webpack path is the one that needs new plumbing. Consider scoping v1 of this issue to "document Vite-builder usage" while the webpack path tracks separately.

Effort

Vite-path documentation: ~1 day. Webpack-path upstream PR: 3-5 days (depends on Storybook addon internals).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions