Skip to content

Commit

Permalink
fix(core): set the full path to the tsconfig.base.json
Browse files Browse the repository at this point in the history
  • Loading branch information
Cammisuli committed Sep 19, 2023
1 parent 6876e65 commit 5a537c1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/nx/src/plugins/js/utils/register.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,9 @@ export function getSwcTranspiler(
const register = require('@swc-node/register/register')
.register as ISwcRegister;

if (existsSync(join(workspaceRoot, 'tsconfig.base.json'))) {
process.env.SWC_NODE_PROJECT = 'tsconfig.base.json';
let rootTsConfig = join(workspaceRoot, 'tsconfig.base.json');
if (existsSync(rootTsConfig)) {
process.env.SWC_NODE_PROJECT = rootTsConfig;
}

const cleanupFn = register(compilerOptions);
Expand Down

0 comments on commit 5a537c1

Please sign in to comment.