We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Learn more about funding links in repositories.
Report abuse
1 parent da1c454 commit 8f63b00Copy full SHA for 8f63b00
packages/tsbb/src/utils/compile.ts
@@ -19,7 +19,12 @@ export async function compile(
19
cjs = path.relative(ts.sys.getCurrentDirectory(), cjs);
20
return new Promise(async (resolve, reject) => {
21
try {
22
- await FS.remove(outDir);
+ if (tsOptions.outDir || cjs) {
23
+ await FS.remove(outDir);
24
+ }
25
+ if (esm) {
26
+ await FS.remove(path.resolve(process.cwd(), esm));
27
28
const dirToFiles = await recursiveReaddirFiles(path.dirname(entry), {
29
exclude: /(tsconfig.json|.d.ts|.(test|spec).(ts|tsx|js|jsx))$/,
30
});
0 commit comments