KC's Workspace
    Preparing search index...
    interface ExportsOptions {
        all?: boolean;
        customExports?: (
            exports: Record<string, any>,
            context: { chunks: ChunksByFormat; isPublish: boolean; pkg: PackageJson },
        ) => Awaitable<Record<string, any>>;
        devExports?: string | boolean;
        exclude?: (string | RegExp)[];
        packageJson?: boolean;
    }
    Index

    Properties

    all?: boolean

    Exports for all files.

    customExports?: (
        exports: Record<string, any>,
        context: { chunks: ChunksByFormat; isPublish: boolean; pkg: PackageJson },
    ) => Awaitable<Record<string, any>>
    devExports?: string | boolean

    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?: (string | RegExp)[]

    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.

    exclude: ['**/*.test.ts', '**/*.spec.ts', /internal/]
    
    packageJson?: boolean

    Exports for package.json file.

    true