@nx/dependency-checks fails to find dependency from css-files #28104
csk-trackunit
started this conversation in
Feature Requests
Replies: 1 comment 1 reply
-
@csk-trackunit The imports are only picked up from JS and TS files since we're using SWC to find them. I'll convert this to a feature request since it is asking for external dependencies to be parsed from CSS files as well. A workaround to your issue might to add the import to the component file instead.
That will import the file as a global CSS file, and SWC should be able to find it. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Current Behavior
I'm using @nx/dependency-checks with eslint to make sure that all dependencies used in a publishable lib is included in the package.json of that lib. Recently we had an issue where installing that lib in an external project failed due to a missing dependency. We tracked it down to an import in a css-file, that was not detected by the linter.
Expected Behavior
I would expect all dependencies of a lib to be found by the linter.
GitHub Repo
https://github.com/csk-trackunit/dependency-issue
Steps to Reproduce
nx lint PubLi
@import "react-image-gallery/styles/css/image-gallery.css";
is not discovered by the linter.see
https://github.com/csk-trackunit/dependency-issue/blob/main/README.md
for more details.Nx Report
Failure Logs
No response
Package Manager Version
No response
Operating System
Additional Information
No response
Beta Was this translation helpful? Give feedback.
All reactions