Skip to content

Commit 283440e

Browse files
authored
fix: fix deleting .tsbuildinfo file (#706)
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.
1 parent 9a025b2 commit 283440e

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

packages/react-native-builder-bob/src/targets/typescript.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -156,8 +156,15 @@ export default async function build({
156156
);
157157
}
158158

159+
const outputs = options?.esm
160+
? {
161+
commonjs: path.join(output, 'commonjs'),
162+
module: path.join(output, 'module'),
163+
}
164+
: { commonjs: output };
165+
159166
const tsbuildinfo = path.join(
160-
output,
167+
outputs.commonjs,
161168
project.replace(/\.json$/, '.tsbuildinfo')
162169
);
163170

@@ -167,13 +174,6 @@ export default async function build({
167174
// Ignore
168175
}
169176

170-
const outputs = options?.esm
171-
? {
172-
commonjs: path.join(output, 'commonjs'),
173-
module: path.join(output, 'module'),
174-
}
175-
: { commonjs: output };
176-
177177
const result = spawn.sync(
178178
tsc,
179179
[

0 commit comments

Comments
 (0)