Skip to content

project reference { "path": "" } is ignored #4484

Description

Steps to reproduce

In every project folder I have a ./tsconfig.build.json which my build script finds and compiles.
In one project I have no subdirectories but only flat files, so I reference "the same directory".

./tsconfig.build.json

{
    "$schema": "http://json.schemastore.org/tsconfig",
    "references": [
        { "path": "" }
    ],
    "files": [],
    "include": []
}

The file ./tsconfig.json contains the final compile:

{
    "$schema": "http://json.schemastore.org/tsconfig",
    "extends": "../tsconfig_base",
    "include": ["./*.ts"]
}

Looks silly, but I also have ./tsconfig.build.json which have this:

    "references": [
        { "path": "Worker/" },
        { "path": "" },

Behavior with typescript@6.0

Compiles

> node_modules\.bin\tsc --build Folder/tsconfig.build.json --force --verbose
[17:36:53] Projects in this build:
    * Folder/tsconfig.json
    * Folder/tsconfig.build.json
...

Behavior with tsgo

> node_modules\.bin\tsgo --build Folder/tsconfig.build.json --force --verbose
[05:37:22 PM] Projects in this build:
    * Folder/tsconfig.build.json
...

When I change the file ./tsconfig.build.json to that:

{
    "$schema": "http://json.schemastore.org/tsconfig",
    "references": [
        { "path": "./" }
    ],
    "files": [],
    "include": []
}

It compiles like a charm, but still I wanted to report the compiler difference.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions