Closed ejhayes closed 2 years ago
Merging #114 into master will not change coverage by
%
. The diff coverage isn/a
.
@@ Coverage Diff @@
## master #114 +/- ##
======================================
Coverage 0.00% 0.00%
======================================
Files 4 4
Lines 129 129
Branches 52 52
======================================
Misses 129 129
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 32338c6...9afa8d9. Read the comment docs.
ts-node
allows specifying overrides within your tsconfig.json
; it might make sense for tsconfig-paths
to detect a ts-node
hook and grab the compiler options from there.
{
"ts-node": {
"compilerOptions": {
"baseUrl": "overridden for ts-node"
}
},
"compilerOptions: {
"baseUrl": "this one is used by tsc"
// ...
}
// detect ts-node and get options
process[Symbol.for('ts-node.register.instance')].config.options
Seems like some ppl find this useful so I will merge it.
However there seems to be some merge conflicts that needs attending to first.
Hi,
Any updates on this?
This PR is very useful. Without this env var, we are forced to either use any of the workarounds mentioned by the OP or use a third-party package like tscpaths
or tsc-alias
. This feature is more convenient than these workarounds and keeps our dependency tree less crowded.
I'd appreciate it if you could merge/release this as soon as possible.
If someone could resolve the conflicts a merge would be possible.
@jonaskello I am willing to contribute but I don't have write access to this repository. Do you want me to submit a new PR?
@information-security Yes, please make a new PR.
Superseded by #185
Adds support for baseUrl overwrite using
TS_NODE_BASEURL
environment variable.First off, thanks for this library! It seems that several people are running into a case where they need to change the
baseUrl
to get this working after runningtsc
. So far most of the solutions look to be either:1) Creating a bootstrap js file for the sole purpose of changing
baseUrl
2) Extendingtsconfig.json
to extend the orginaltsconfig.json
and then setbaseUrl
based on thatIt seems like the simplest solution would be to allow changing the baseUrl via environment variable instead of either of the above options.