Closed TomONeill closed 1 year ago
We can't really exclude these from the graph. Imagine you publish your storybook instance, or run some e2e against it. You wouldn't want cache hits when changing the imported library, since it is a real dependency in this case.
That being said, in order to prevent the above import from breaking your cache, I'd recommend looking into namedInputs inside nx.json, you should be able to tune the prod
input to exclude stories and then you would still get cache hits for build whenever you change storybook files on the library or its dependencies.
You're right, I didn't view it from Storybook's perspective. Thank you for your reply and suggestion!
This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context.
Current Behavior
When having two libraries that do not depend on each other in their implementation, but do in one of their
.stories.ts
files, the libraries are seen as dependent on each other in the dependency tree (nx graph
) and ESLint (enforce-module-boundaries
).Expected Behavior
As Storybook stories are not actual dependencies of the library, they should be ignored.
Github Repo
No response
Steps to Reproduce
Let's say I've got these libraries that are not dependent on each other in their implementation:
shared-ui-details
shared-ui-button
Adding this in the
shared-ui-details
library:a dependency is created between the two libraries:
Nx Report
Failure Logs
No response
Additional Information
No response