You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I ran into a problem while using knip detection in a monorepo project.
Let me give you an example:
The project comprises two sub-packages, app and infrastructure, where app relies on infrastructure's baseMethod.
When I import the baseMethod() from '@infrastructure/lib/base' in app and run 'knip --production', the file 'packages/infrastructure/lib/base.ts' is flagged as unnecessary.
But when I import the baseMethod from 'infrastructure/lib/base', knip correctly identifies 'packages/infrastructure/lib/base.ts' as a necessary file. I'm wondering, why does the presence of the '@' symbol cause this misidentification?
Here's the layout of the project structure.
Can you assist me? Could there be an issue with how I'm using knip?
The text was updated successfully, but these errors were encountered:
Suggest an idea for Knip
I ran into a problem while using knip detection in a monorepo project.

Let me give you an example:
The project comprises two sub-packages, app and infrastructure, where app relies on infrastructure's baseMethod.
When I import the baseMethod() from '@infrastructure/lib/base' in app and run 'knip --production', the file 'packages/infrastructure/lib/base.ts' is flagged as unnecessary.
But when I import the baseMethod from 'infrastructure/lib/base', knip correctly identifies 'packages/infrastructure/lib/base.ts' as a necessary file. I'm wondering, why does the presence of the '@' symbol cause this misidentification?
Here's the layout of the project structure.
The text was updated successfully, but these errors were encountered: