Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow named primitive constant export for TITLE #592

Open
lunelson opened this issue Dec 31, 2024 · 0 comments
Open

Allow named primitive constant export for TITLE #592

lunelson opened this issue Dec 31, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@lunelson
Copy link

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

@lunelson lunelson added the needs triage needs to be reviewed label Dec 31, 2024
@tajo tajo added enhancement New feature or request and removed needs triage needs to be reviewed labels Jan 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants