Skip to content

Commit 2d29c30

Browse files
committed
chore: clean only tsc files
1 parent aa54c0b commit 2d29c30

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

scripts/compilation/Inliner.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,9 @@ module.exports = class Inliner {
335335
.join("/")) + "/index.js";
336336

337337
if (!this.reExportStubs) {
338-
fs.rmSync(file);
338+
if (fs.readFileSync(file, "utf-8").includes(`Object.defineProperty(exports, "__esModule", { value: true });`)) {
339+
fs.rmSync(file);
340+
}
339341
const files = fs.readdirSync(path.dirname(file));
340342
if (files.length === 0) {
341343
fs.rmdirSync(path.dirname(file));

0 commit comments

Comments
 (0)