Skip to content

Default "exclude" property in tsconfig.json doesn't respect relative path of the "ourdir"  #8998

Closed

Description

@yuit
{
  "compilerOptions": {
    "outDir": "../someFolders"
  }
}

The default "exclude" property doesn't include "../someFolders"

Activity

  1. added this to the TypeScript 2.0 milestone on Jun 7, 2016
  2. self-assigned this
    on Jun 7, 2016
  3. jcansdale commented on Jun 7, 2016

    @jcansdale

    It doesn't seem to automatically exclude a simple outDir either. For example:

    {
    "compilerOptions": {
    "outDir": "lib"
    }
    }

    This is a problem if "allowJs" is true!

  4. yuit commented on Jun 8, 2016

    @yuit
    ContributorAuthor

    Jamie Cansdale (@jcansdale) do you mean this won't work correctly:

    {
        "compilerOptions": {
           "outDir": "lib",
           "allowJs": true
         }
    }
    
    then default "exclude" won't exclude "outDir" value
  5. jcansdale commented on Jun 8, 2016

    @jcansdale

    Yui (@yuit) Almost. The following isn't working correctly for me:

    {
    "compilerOptions": {
    "outDir": "lib",
    "allowJs": true
    },
    "exclude": [
    "node_modules"
    ]
    }

    It produces such gems as:
    Build: Cannot write file '..../NodejsConsoleApp2/MyModule/lib/lib/lib/lib/lib/lib/lib/index.js' because it would overwrite input file.

    (I'm using tsc 1.8.10 and Node.js Tools for Visual Studio 1.2 Alpha)

  6. yuit commented on Jun 8, 2016

    @yuit
    ContributorAuthor

    Jamie Cansdale (@jcansdale) this issue of not include "outdir" in "exclude" at all already fixed in the nightly built.

    Though the nightly built will not include "outdir" into "exclude" correctly if "outdir" is in relative path format . However, with your format it should work correctly

  7. locked and limited conversation to collaborators on Jun 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScriptFixedA PR has been merged for this issue

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions