-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Compiler outputs files to the wrong directory structure #5809
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
Comments
|
Thanks for the tip @falsandtru. Setting Unfortunately I can't seem to fix the second issue by setting
but the compiler then fails to find the source files:
|
Correct code: {
"compilerOptions": {
"module": "commonjs",
"target": "es6",
"noImplicitAny": true,
"sourceMap": false,
"declaration": false,
"noLib": false,
"outDir": "../../lib3",
"rootDir": ".."
},
"files": [
"../first/file1.ts",
"../second/file2.ts"
]
} |
That does indeed work, thanks @falsandtru. |
Not at all. Let's complete a issue with closing of it. |
For future reference, the explanation of the |
I've noticed a couple of issues with the way the compiler resolves the output directory structure. I've created a minimal project that can be used to reproduce these issues, it's setup as an NPM package, so after cloning/extracting run
npm install
to install the latest nightly build of TypeScript (support for filenames in the--project
compiler option was added very recently).Issue 1
From the package root run
Note that the output directory structure is (as expected):
Now run
Note that the output directory structure is missing the subdir
second
:While the expected output directory structure is:
Issue 2
I'm not sure if this is a bug or just user error, but it can be reproduced starting with TypeScript 1.6.2 (and possibly earlier, that's just the oldest version I've tried). Run
Note that the output directory structure is:
While the expected output directory structure is:
The text was updated successfully, but these errors were encountered: