Skip to content
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

Should tsBuildInfoFile and incremental options are removed in fixConfig function? #811

Closed
timocov opened this issue Apr 2, 2019 · 4 comments · Fixed by #815
Closed

Should tsBuildInfoFile and incremental options are removed in fixConfig function? #811

timocov opened this issue Apr 2, 2019 · 4 comments · Fixed by #815

Comments

@timocov
Copy link
Contributor

timocov commented Apr 2, 2019

It looks like ts-node removes some compiler options that doesn't work with ts-node in

ts-node/src/index.ts

Lines 424 to 444 in 8706c31

function fixConfig (ts: TSCommon, config: _ts.ParsedCommandLine) {
// Delete options that *should not* be passed through.
delete config.options.out
delete config.options.outFile
delete config.options.composite
delete config.options.declarationDir
delete config.options.declarationMap
delete config.options.emitDeclarationOnly
// Target ES5 output by default (instead of ES3).
if (config.options.target === undefined) {
config.options.target = ts.ScriptTarget.ES5
}
// Target CommonJS modules by default (instead of magically switching to ES6 when the target is ES6).
if (config.options.module === undefined) {
config.options.module = ts.ModuleKind.CommonJS
}
return config
}
, right?

Setting tsBuildInfoFile compiler option (in my case for composite project) fail build with Emit skipped error. Should this option (quite possible that incremental should be removed too?) be removed along with other options in that function?

Related issue: #656

@wclr
Copy link
Contributor

wclr commented Apr 4, 2019

Wonder if incremental compilation can be supported by ts-node?

@blakeembrey
Copy link
Member

@whitecolor I think that'd be really awesome, but I don't think the APIs are currently exposed.

@timocov Absolutely, feel free to make a PR.

@timocov
Copy link
Contributor Author

timocov commented Apr 5, 2019

@blakeembrey 👌. I just created #815 with removing these properties.

@wclr
Copy link
Contributor

wclr commented Apr 6, 2019

@blakeembrey the issue that tracks it
microsoft/TypeScript#29978

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants