Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
yuit opened this issue Jun 7, 2016 · 4 comments
Assignees
Labels
Bug A bug in TypeScript Fixed A PR has been merged for this issue

Comments

@yuit
Copy link
Contributor

yuit commented Jun 7, 2016

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

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

@yuit yuit added the Bug A bug in TypeScript label Jun 7, 2016
@yuit yuit added this to the TypeScript 2.0 milestone Jun 7, 2016
@yuit yuit self-assigned this Jun 7, 2016
@jcansdale
Copy link

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

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

This is a problem if "allowJs" is true!

@yuit
Copy link
Contributor Author

yuit commented Jun 8, 2016

@jcansdale do you mean this won't work correctly:

{
    "compilerOptions": {
       "outDir": "lib",
       "allowJs": true
     }
}

then default "exclude" won't exclude "outDir" value

@jcansdale
Copy link

@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)

@yuit
Copy link
Contributor Author

yuit commented Jun 8, 2016

@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

@yuit yuit closed this as completed in #9025 Jun 8, 2016
@yuit yuit added the Fixed A PR has been merged for this issue label Jun 8, 2016
@microsoft microsoft locked and limited conversation to collaborators Jun 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug A bug in TypeScript Fixed A PR has been merged for this issue
Projects
None yet
Development

No branches or pull requests

2 participants