Skip to content

feat(exports): support object option for customExports#769

Merged
sxzz merged 8 commits intorolldown:mainfrom
Joery-M:object-argument-for-custom-exports
Feb 12, 2026
Merged

feat(exports): support object option for customExports#769
sxzz merged 8 commits intorolldown:mainfrom
Joery-M:object-argument-for-custom-exports

Conversation

@Joery-M
Copy link
Contributor

@Joery-M Joery-M commented Feb 11, 2026

  • This PR contains AI-generated code, but I have carefully reviewed it myself. Otherwise, my PR may be closed.

(I did AI generate the Chinese translation of the docs change, the rest is all written by me)

Description

This PR adds support for providing an object directly to exports.customExports instead of having to make a function.

Linked Issues

Closes #767

Additional context

I modified the root tsdown.config.ts to use this change since it is exactly the use-case this PR is trying to improve.

@netlify
Copy link

netlify bot commented Feb 11, 2026

Deploy Preview for tsdown ready!

Name Link
🔨 Latest commit 597b0ef
🔍 Latest deploy log https://app.netlify.com/projects/tsdown/deploys/698d80b7e1cff2000834036a
😎 Deploy Preview https://deploy-preview-769--tsdown.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@pkg-pr-new
Copy link

pkg-pr-new bot commented Feb 11, 2026

Open in StackBlitz

tsdown

pnpm add https://pkg.pr.new/tsdown@769 -D
npm i https://pkg.pr.new/tsdown@769 -D
yarn add https://pkg.pr.new/[email protected] -D

create-tsdown

pnpm add https://pkg.pr.new/create-tsdown@769 -D
npm i https://pkg.pr.new/create-tsdown@769 -D
yarn add https://pkg.pr.new/[email protected] -D

tsdown-migrate

pnpm add https://pkg.pr.new/tsdown-migrate@769 -D
npm i https://pkg.pr.new/tsdown-migrate@769 -D
yarn add https://pkg.pr.new/[email protected] -D

commit: 597b0ef

@sxzz sxzz changed the title Support object argument for customExports feat(exports): support object argument for customExports Feb 12, 2026
@sxzz sxzz changed the title feat(exports): support object argument for customExports feat(exports): support object option for customExports Feb 12, 2026
@sxzz sxzz enabled auto-merge (squash) February 12, 2026 07:27
@sxzz sxzz merged commit 7fb7286 into rolldown:main Feb 12, 2026
16 of 17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

exports.customExports should accept an object

2 participants