-
Notifications
You must be signed in to change notification settings - Fork 123
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
referenced source files, outside of the baseDir, cause a (silent!) change to the compiled file paths #201
Comments
think you need to exclude |
@iislucas @TypeStrong/owners I feel like removing all |
@basarat : I think I am specifying it as a target option above (the task options would be directly under |
@iislucas no a target option is directly under |
So options under the options value of a target are called task options. sigh... But thanks for clarifying! So If I'm understanding correctly, you're saying this config should avoid generating the
However, trying this also does not work: I still end up with output in: (I'm renaming this issue to clarify that the real issue is that baseDir doesn't stop tsc from generating too many subdirectories, and that what we'd really like is a cwd like behaviour as well as baseDir (baseDir just stops directories being flattened in their output if I understand correctly...) |
baseDir
option doesn't avoid generating full paths, something like cwd
would help
OK, one more update... when I do the same thing but specify a single
It does indeed output files to 'build/foo/' and not 'build/src/foo/', but when I specify multiple src files, they annoyingly appear in 'build/src/foo/'... a bug? |
Possibly a bug. can you tell me the |
It's a little unclear what causes this behavior to sometimes happen, e.g. in this project: |
OK, I figured this out: the problem is when some referenced source lives outside of the baseDir, e.g. when compiling (with
and |
Awesome! |
I've updated the description; we can probably now remove the confused comments :-) |
baseDir
option doesn't avoid generating full paths, something like cwd
would help
When some referenced source lives outside of the baseDir, e.g. when compiling (with
baseDir: 'src'
andoutDir: 'build'
):and
src/d1/foo.ts
contains a require (or reference?) to pull in something fromthird_party/bar.ts
then the generated output files end up within an extra subdirectorysrc
, i.e.build/src/
, even ifbaseDir
was set tosrc
. I think, in this case, it's probably best to give an error as otherwise typescript wouldn't know where to putthird_party/bar.ts
, so it's kind of forced to ignore thebaseDir
.The text was updated successfully, but these errors were encountered: