Skip to content

Commit 692eedb

Browse files
committed
fix: skip empty __exportAll call
1 parent 77d980b commit 692eedb

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

src/fake-js.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -972,6 +972,7 @@ function patchTsNamespace(nodes: t.Statement[]) {
972972
if (!result) continue
973973

974974
const [binding, exports] = result
975+
if (!exports.properties.length) continue
975976

976977
nodes[i] = {
977978
type: 'TSModuleDeclaration',

tests/__snapshots__/index.test.ts.snap

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -422,9 +422,7 @@ exports[`re-export from lib > both 1`] = `
422422
export * from "stub-lib";
423423
424424
//#region \\0rolldown/runtime.js
425-
declare namespace a_d_exports {
426-
export {};
427-
}
425+
428426
import * as import_stub_lib from "stub-lib";
429427
//#endregion
430428
export { import_stub_lib as t };
@@ -441,9 +439,6 @@ export * from "stub-lib";"
441439
442440
exports[`re-export from lib > onlyB 1`] = `
443441
"// b.d.ts
444-
declare namespace a_d_exports {
445-
export {};
446-
}
447442
import * as import_stub_lib from "stub-lib";
448443
type LibType = import_stub_lib.LibType;
449444
export { type LibType };"

0 commit comments

Comments
 (0)