Skip to content

Allow named primitive constant export for TITLE #592

@lunelson

Description

@lunelson

Is your feature request related to a problem? Please describe.
As established in #453, the default export pattern for the story meta information breaks HMR

Describe the solution you'd like
The rules of react-refresh do allow primitive constant exports however; so one could write a routine that looks for a string export called TITLE for example, and take the story title from there.

Describe alternatives you've considered
An alternative would be some kind of config-level parametrization of title-prefixing, based on story file path?

Would you be open to this feature? I'd take a shot at doing a PR

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions