0

Consider this jsconfig.json:

{
  "compilerOptions": {
    "baseUrl": ".",
    "paths": {
      "Form": [
        "components/Form/Exports",
      ],
      "OtherForm": [
        "Modules/Forms/Exports",
      ],
    }
  }
}

I can import from any of these aliases and it works:

import { SomeComponent } from 'Form'
import { AnotherComponent } from 'OtherForm'

But when I mix them as specified in the docs, it breaks:

{
  "compilerOptions": {
    "baseUrl": ".",
    "paths": {
      "Form": [
        "components/Form/Exports",
        "Modules/Forms/Exports",
      ],
    }
  }
}

Now the import { AnotherComponent } from 'Form' complains that AnotherComponent is undefined.

How can I debug this? The paths are clearly correct, because they work when they are separate. Components are also there, cause they would render in the state separate aliases. It breaks just when I combine the aliases into one alias.

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Big boy
  • 1,113
  • 2
  • 8
  • 23

0 Answers0