Skip to content

Commit

Permalink
fix: fix deleting .tsbuildinfo file (#706)
Browse files Browse the repository at this point in the history
After adding ESM support, the path for `.tsbuildinfo` changed, but the
code still referred to the previous path. This fixes the code to use the
correct path.
  • Loading branch information
satya164 authored Nov 27, 2024
1 parent 9a025b2 commit 283440e
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions packages/react-native-builder-bob/src/targets/typescript.ts
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,15 @@ export default async function build({
);
}

const outputs = options?.esm
? {
commonjs: path.join(output, 'commonjs'),
module: path.join(output, 'module'),
}
: { commonjs: output };

const tsbuildinfo = path.join(
output,
outputs.commonjs,
project.replace(/\.json$/, '.tsbuildinfo')
);

Expand All @@ -167,13 +174,6 @@ export default async function build({
// Ignore
}

const outputs = options?.esm
? {
commonjs: path.join(output, 'commonjs'),
module: path.join(output, 'module'),
}
: { commonjs: output };

const result = spawn.sync(
tsc,
[
Expand Down

0 comments on commit 283440e

Please sign in to comment.