Skip to content

Commit

Permalink
fix: target opt should override tsconfig specified defaults
Browse files Browse the repository at this point in the history
closes #165
  • Loading branch information
antongolub committed Aug 5, 2024
1 parent c52b03d commit b365c46
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/ts/fix.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import {
import {
asArray,
existsSync,
glob,
read,
readJson,
remove,
Expand Down Expand Up @@ -45,7 +44,8 @@ const resolve = async (opts: IFixOptionsNormalized): Promise<TFixContext> => {
const {cwd, target, src, tsconfig, out = cwd, ext, debug, unlink, sourceMap} = opts
const outDir = path.resolve(cwd, out)
const sources = asArray<string>(src)
const targets = [...asArray<string>(target), ...getTsconfigTargets(tsconfig, cwd)]
const _targets = asArray<string>(target)
const targets = _targets.length > 0 ? _targets : getTsconfigTargets(tsconfig, cwd)
debug('debug:cwd', cwd)
debug('debug:outdir', outDir)
debug('debug:sources', sources)
Expand Down

0 comments on commit b365c46

Please sign in to comment.