Skip to content

Commit

Permalink
fix(rollup): keep empty type-only modules
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 committed Jul 2, 2024
1 parent 681e1ee commit 7a6469b
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions src/builders/rollup/plugins/esbuild.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,10 @@ export function esbuild(options: EsbuildOptions): Plugin {

printWarnings(id, result, this);

return result.code
? {
code: result.code,
map: result.map || null,
}
: null;
return {
code: result.code || "",
map: result.map || null,
};
},

async renderChunk(
Expand All @@ -108,7 +106,7 @@ export function esbuild(options: EsbuildOptions): Plugin {
minify: true,
});
return {
code: result.code,
code: result.code || "",
map: result.map || null,
};
},
Expand Down

0 comments on commit 7a6469b

Please sign in to comment.