Skip to content

Commit 30f14ff

Browse files
feat: support configure TreeshakingOptions (#573)
1 parent c73867d commit 30f14ff

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/options/types.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ import type {
3535
ModuleFormat,
3636
ModuleTypes,
3737
OutputOptions,
38+
TreeshakingOptions,
3839
} from 'rolldown'
3940
import type { Options as DtsOptions } from 'rolldown-plugin-dts'
4041
import type { Options as UnusedOptions } from 'unplugin-unused'
@@ -60,6 +61,7 @@ export type {
6061
PublintOptions,
6162
ReportOptions,
6263
RolldownContext,
64+
TreeshakingOptions,
6365
TsdownChunks,
6466
TsdownHooks,
6567
UnusedOptions,
@@ -177,9 +179,11 @@ export interface Options {
177179
shims?: boolean
178180

179181
/**
182+
* Configure tree shaking options.
183+
* @see {@link https://rolldown.rs/options/treeshake} for more details.
180184
* @default true
181185
*/
182-
treeshake?: boolean
186+
treeshake?: boolean | TreeshakingOptions
183187

184188
/**
185189
* Sets how input files are processed.

0 commit comments

Comments
 (0)