-
-
Notifications
You must be signed in to change notification settings - Fork 280
Closed
Labels
questionFurther information is requestedFurther information is requested
Description
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.

Metadata
Metadata
Assignees
Labels
questionFurther information is requestedFurther information is requested