Skip to content

Interface: ExportsOptions

Defined in: src/features/pkg/exports.ts:15

Properties

all?

ts
optional all: boolean;

Defined in: src/features/pkg/exports.ts:26

Exports for all files.


customExports()?

ts
optional customExports: (exports, context) => Awaitable<Record<string, any>>;

Defined in: src/features/pkg/exports.ts:40

Parameters

exports

Record<string, any>

context
chunks

ChunksByFormat

isPublish

boolean

pkg

PackageJson

Returns

Awaitable<Record<string, any>>


devExports?

ts
optional devExports: string | boolean;

Defined in: src/features/pkg/exports.ts:21

Generate exports that link to source code during development.

  • string: add as a custom condition.
  • true: all conditions point to source files, and add dist exports to publishConfig.

exclude?

ts
optional exclude: (string | RegExp)[];

Defined in: src/features/pkg/exports.ts:38

Define filenames or RegExp patterns to exclude files from exports. This is useful for excluding files that should not be part of the package exports, such as bin files or internal utilities.

Example

js
exclude: ['foo.ts', /\.spec\.ts$/, /internal/]

Released under the MIT License.