From c8e8445c7d499d4b58e37d9b326dc83dd153b468 Mon Sep 17 00:00:00 2001 From: "autofix-ci[bot]" <114827586+autofix-ci[bot]@users.noreply.github.com> Date: Tue, 17 Dec 2024 09:12:43 +0000 Subject: [PATCH] chore: apply automated updates --- src/builders/rollup/build.ts | 2 +- src/builders/rollup/plugins/cjs.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/builders/rollup/build.ts b/src/builders/rollup/build.ts index 3af01e6..f7c4988 100644 --- a/src/builders/rollup/build.ts +++ b/src/builders/rollup/build.ts @@ -82,7 +82,7 @@ export async function rollupBuild(ctx: BuildContext): Promise { ...rollupOptions.plugins, dts(ctx.options.rollup.dts), removeShebangPlugin(), - ctx.options.rollup.emitCJS && fixCJSExportTypePlugin() + ctx.options.rollup.emitCJS && fixCJSExportTypePlugin(), ].filter(Boolean); await ctx.hooks.callHook("rollup:dts:options", ctx, rollupOptions); diff --git a/src/builders/rollup/plugins/cjs.ts b/src/builders/rollup/plugins/cjs.ts index b487c47..5edfa5b 100644 --- a/src/builders/rollup/plugins/cjs.ts +++ b/src/builders/rollup/plugins/cjs.ts @@ -21,7 +21,7 @@ export function fixCJSExportTypePlugin(): Plugin { renderChunk(code, info, opts) { if ( info.type !== "chunk" || - !info.fileName.endsWith('.d.cts') || + !info.fileName.endsWith(".d.cts") || !info.isEntry || info.exports?.length !== 1 || info.exports[0] !== "default"