Skip to content

Commit

Permalink
chore: stop generating re-export stubs for clients (#5842)
Browse files Browse the repository at this point in the history
  • Loading branch information
kuhe authored Feb 29, 2024
1 parent f05b540 commit 7e1e66c
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion scripts/compilation/Inliner.js
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,15 @@ module.exports = class Inliner {
.map(() => "..")
.join("/")) + "/index.js";

fs.writeFileSync(file, `module.exports = require("${indexRelativePath}");`);
if (this.isClient) {
fs.rmSync(file);
const files = fs.readdirSync(path.dirname(file));
if (files.length === 0) {
fs.rmdirSync(path.dirname(file));
}
} else {
fs.writeFileSync(file, `module.exports = require("${indexRelativePath}");`);
}
}

return this;
Expand Down

0 comments on commit 7e1e66c

Please sign in to comment.