Self-referential Circular Import Issue in UI Component Library #7008
QingShan-Xu
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Problem Description
In the monorepo demo, are there any potential circular dependency issues in the UI component library?
importing utilities from the same package using the package name path
@workspace/ui/lib/utils
instead of relative paths../../lib/utils
.Does this create a self-referencing circular import because:
The component is part of the
@workspace/ui
packageIt imports from
@workspace/ui/lib/utils
(same package)I know that in tsconfig.json it is only used as a development path:
But won't this confuse the compiler in apps or this forces the package to reference itself during build time?
Beta Was this translation helpful? Give feedback.
All reactions