Interface: ExportsOptions
Defined in: src/features/pkg/exports.ts:20
Properties
all?
optional all: boolean;Defined in: src/features/pkg/exports.ts:37
Exports for all files.
customExports()?
optional customExports: (exports, context) => Awaitable<Record<string, any>>;Defined in: src/features/pkg/exports.ts:61
Parameters
exports
Record<string, any>
context
chunks
ChunksByFormat
isPublish
boolean
pkg
PackageJson
Returns
Awaitable<Record<string, any>>
devExports?
optional devExports: string | boolean;Defined in: src/features/pkg/exports.ts:26
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?
optional exclude: (string | RegExp)[];Defined in: src/features/pkg/exports.ts:49
Define globs 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
exclude: ['**/*.test.ts', '**/*.spec.ts', /internal/]legacy?
optional legacy: boolean;Defined in: src/features/pkg/exports.ts:59
Generate legacy fields (main and module) for older Node.js and bundlers that do not support package exports field.
Defaults to false, if only ESM builds are included, true otherwise.
See
https://github.com/publint/publint/issues/24
packageJson?
optional packageJson: boolean;Defined in: src/features/pkg/exports.ts:32
Exports for package.json file.
Default
true