Skip to content

[Documentation]: Setting environment IS_CHROMATIC=true doesn't work as intended #699

@LeLunZ

Description

@LeLunZ

Describe the problem

To check, if storybook was run with chromatic there are multiple options. In the docs one way describes using environment variables.
There it says to just set IS_CHROMATIC=true and then its possible in the story files to just check process.env.IS_CHROMATIC.

But that doesn't work.
Storybook needs all environment variables prefixed with STORYBOOK_, else they won't appear in the final build.

The docs should probably be updated to use STORYBOOK_IS_CHROMATIC instead of IS_CHROMATIC

URL of the page with the issue

https://www.chromatic.com/docs/ischromatic/

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions