Skip to content

chore(package): add package.json as an export#1670

Open
clementprevot wants to merge 1 commit intoreact-hookz:masterfrom
clementprevot:master
Open

chore(package): add package.json as an export#1670
clementprevot wants to merge 1 commit intoreact-hookz:masterfrom
clementprevot:master

Conversation

@clementprevot
Copy link
Copy Markdown

What is the current behavior, and the steps to reproduce the issue?

When using @react-hookz/web in a component library (like a design system) that uses Storybook, Storybook browses dependencies looking for some dedicated meta in each dependency "package.json" file (storybook field).

But as @react-hooks/web does not export its "package.json" file, Storybook spits the following warning:

unable to find package.json for @react-hookz/web

Its not really an issue, more an annoyance.

What is the expected behavior?

Storybook has access to @react-hooks/web's "package.json" file.

How does this PR fix the problem?

Simply by adding "package.json" as an export of itself :-)

Checklist

  • Have you read contribution guideline?
  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Is there an existing issue for this PR?
  • Have the files been linted and formatted?
  • Have the docs been updated to match the changes in the PR?
  • Have the tests been updated to match the changes in the PR?
  • Have you run the tests locally to confirm they pass?

Storybook browse dependencies looking for some Storybook dedicated meta in the package.json file.

But as @react-hooks/web does not export its package.json file, Storybook spits a warning

> unable to find package.json for @react-hookz/web

Adding this export solves this warning
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant