Skip to content

Commit

Permalink
fix: merge ts-node opts in reverse
Browse files Browse the repository at this point in the history
  • Loading branch information
mdonnalley committed Nov 1, 2023
1 parent b10562d commit 2131d2a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/config/ts-node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ async function loadTSConfig(root: string): Promise<TSConfig | undefined> {

if (tsconfig.extends) {
const {parse} = await import('tsconfck')
const result = await parse(tsconfigPath, {})
const result = await parse(tsconfigPath)
const tsNodeOpts = Object.fromEntries(
(result.extended ?? []).flatMap((e) => Object.entries(e.tsconfig['ts-node'] ?? {})),
(result.extended ?? []).flatMap((e) => Object.entries(e.tsconfig['ts-node'] ?? {})).reverse(),
)

TS_CONFIGS[root] = {...result.tsconfig, 'ts-node': tsNodeOpts}
Expand Down

0 comments on commit 2131d2a

Please sign in to comment.