Skip to content

Commit

Permalink
Accept ts-node overrides
Browse files Browse the repository at this point in the history
  • Loading branch information
BriungRi authored and Shinigami92 committed Apr 11, 2024
1 parent ce945b5 commit b1e0260
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions bin/node-pg-migrate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,17 @@ function readTsconfig() {
encoding: 'utf-8',
});
tsconfig = json5 ? json5.parse(config) : JSON.parse(config);

if (tsconfig['ts-node']) {
tsconfig = {
...tsconfig,
...tsconfig['ts-node'],
compilerOptions: {
...(tsconfig.compilerOptions ?? {}),
...(tsconfig['ts-node'].compilerOptions ?? {}),
},
};
}
} catch (err) {
console.error("Can't load tsconfig.json:", err);
}
Expand Down

0 comments on commit b1e0260

Please sign in to comment.