Skip to content

Commit 859542f

Browse files
committed
perf: don't include user plugins for cjs dts
1 parent 6319d17 commit 859542f

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

src/index.ts

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,12 @@ async function getBuildOptions(
226226
plugins.push(Unused.rolldown(unused === true ? {} : unused))
227227
}
228228
if (target) {
229-
plugins.push(RuntimeHelperCheckPlugin(target))
229+
plugins.push(
230+
RuntimeHelperCheckPlugin(target),
231+
// Use Lightning CSS to handle CSS input. This is a temporary solution
232+
// until Rolldown supports CSS syntax lowering natively.
233+
await LightningCSSPlugin({ target }),
234+
)
230235
}
231236
plugins.push(ShebangPlugin(cwd, name, isMultiFormat))
232237
}
@@ -235,16 +240,10 @@ async function getBuildOptions(
235240
plugins.push(ReportPlugin(report, cwd, cjsDts, name, isMultiFormat))
236241
}
237242

238-
if (target) {
239-
plugins.push(
240-
// Use Lightning CSS to handle CSS input. This is a temporary solution
241-
// until Rolldown supports CSS syntax lowering natively.
242-
await LightningCSSPlugin({ target }),
243-
)
243+
if (!cjsDts) {
244+
plugins.push(userPlugins)
244245
}
245246

246-
plugins.push(userPlugins)
247-
248247
const inputOptions = await mergeUserOptions(
249248
{
250249
input: entry,

0 commit comments

Comments
 (0)