Skip to content

jsconfig compiler options paths ignored #359

@abidibo

Description

@abidibo

Hi, in my new nvim configuration, with all coc plugins updated I noticed that auto import and coc-definition command do not follow the paths rules defined in jsconfig:

Example of jsconfig:

{
  "compilerOptions": {
    "module": "commonjs",
    "target": "es6",
    "baseUrl": "./src",
    "paths": {
      "@Common/*": ["./Common/*"],
      "@Core/*": ["./Core/*"],
      "@Config": ["./Config/index.js"],
      "@Config/*": ["./Config/*"],
      "@Auth/*": ["./Auth/*"],
    }
  },
  "exclude": ["dist"]
}

When auto-importing a module, the relative path (i.e. ../../Common/Components/Foo) is used instead of the mapped one (@Common/Components/Foo).

At the same time nvim can't follow the definition of such imports.

All these stuff was working well with the same code base with an older nvim installation.

Any idea?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions