Skip to content

Commit 4c038d6

Browse files
committed
chore: clean up bundle fn with finally block instead of catch and throw
1 parent 85757e6 commit 4c038d6

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

src/lib/generateBundle.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -83,15 +83,9 @@ export function generateBundle(
8383
if (compilerOptions.declarationDir!.endsWith("dts-prebundle")) {
8484
rmSync(compilerOptions.declarationDir!, { recursive: true });
8585
}
86-
86+
} finally {
8787
if (shouldDeleteTsConfig && tsconfigPath) {
8888
rmSync(tsconfigPath);
8989
}
90-
} catch (e) {
91-
if (shouldDeleteTsConfig && tsconfigPath) {
92-
rmSync(tsconfigPath);
93-
}
94-
95-
throw e;
9690
}
9791
}

0 commit comments

Comments
 (0)