79394213

Date: 2025-01-28 14:49:16
Score: 0.5
Natty:
Report link

I (possibly) found the reason. I had a component and an index ts file like this:

libs/components/src/lib/my-component
  my-component.component.ts
  my-component.component.html
  my-component.component.scss
  index.ts

The index.ts file had only one line it, an export:

export { MyComponent } from './my-component.component';

In my tsconfig.json there is a path defined like this:

"@components/*": [
  "libs/components/src/lib/*/index.ts"
],

The component was then imported like this:

import { MyComponent } from '@components/my-component';

Removing the index.ts file and just importing the component directly by its actual path solved it.

However, I cannot really say why or if it was just a coincidence.

Reasons:
  • Blacklisted phrase (0.5): I cannot
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: killexe