Skip to content

Ability to extend compilerOptions's paths config #44589

Open
@xiejay97

Description

@xiejay97

Suggestion

I have a tsconfig.base.json file for the monorepo, it defined paths that all project can use

{
  "compileOnSave": false,
  "compilerOptions": {
    ```
    "paths": {
      "@aegis/ui": ["libs/ui/src/index.ts"],
      "@aegis/ui/*": ["libs/ui/src/*"],
      "@aegis/shared": ["libs/shared/src/index.ts"],
      "@aegis/shared/*": ["libs/shared/src/*"]
    }
  },
  "exclude": ["node_modules", "tmp"]
}

Each project has own tsconfig.json, also defined paths that only for itself

{
  "extends": "../../tsconfig.base.json",
  "compilerOptions": {
    "paths": {
      "@environment": ["src/environments/environment.ts"]
    }
  },
  "files": [],
  "include": [],
  "references": [
    {
      "path": "./tsconfig.app.json"
    },
    {
      "path": "./tsconfig.spec.json"
    },
    {
      "path": "./tsconfig.editor.json"
    }
  ]
}

Unfortunately, the paths would be overwritten.

I have to add tsconfig.base.json paths item to each project.

So, it's necessary to provide a solution for this case.

🔍 Search Terms

  • compilerOptions paths extends label:Suggestion

List of keywords you searched for before creating this issue. Write them down here so that others can find this suggestion more easily and help provide feedback.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Awaiting More FeedbackThis means we'd like to hear from more people who would be helped by this featureSuggestionAn idea for TypeScript

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions