Skip to content

different results if --outDir using relative path is in parent or child tsconfig #24851

Closed
@nolazybits

Description

@nolazybits

Hello,

I don't know if it's intentional or not but given this structure:

* base.tsconfig.json
* aFolder/
      * tsconfig.json (extends base.tsconfig.json)

Actual behavior:
Now running tsc in aFolder:

  • if I have an outDir option in the base.tsconfig.json defined as ./dist it will create the dist folder in the root folder
* base.tsconfig.json
* aFolder/
      * tsconfig.json (extends base.tsconfig.json)
* dist/
  • if I have an outDir option in the aFolder/tsconfig.json defined as ./dist it will create the dist folder under the aFolder
* base.tsconfig.json
* aFolder/
      * tsconfig.json (extends base.tsconfig.json)
      * dist/
  • if I don't specify any outDir files are output in the aFolder folder

Expected behavior:
I would expect the dist folder to be created relatively to the path of the main tsconfig used by typescript (here tsconfig.json) regardless if outDir has been specified in the parent or child tsconfig.json

Metadata

Metadata

Assignees

No one assigned

    Labels

    Working as IntendedThe behavior described is the intended behavior; this is not a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions