Skip to content

feat: generate CSS exports when css.splitting is disabled - #680

Merged
sxzz merged 10 commits into
rolldown:mainfrom
jinghaihan:feat/exports-merged-css
Jan 1, 2026
Merged

feat: generate CSS exports when css.splitting is disabled#680
sxzz merged 10 commits into
rolldown:mainfrom
jinghaihan:feat/exports-merged-css

Conversation

@jinghaihan

Copy link
Copy Markdown
Contributor

Description

Automatically generates CSS exports in package.json when css.splitting is disabled. This enables component libraries to bundle CSS into a single file and expose it via package exports for users to import.

Additional context

generateExports now accepts a single options object (containing exports, logger, css, outDir) instead of separate ExportsOptions and logger parameters. This change enables future extensions where exports generation depends on multiple configuration options.

@netlify

netlify Bot commented Dec 31, 2025

Copy link
Copy Markdown

Deploy Preview for tsdown ready!

Name Link
🔨 Latest commit 35b0ff2
🔍 Latest deploy log https://app.netlify.com/projects/tsdown/deploys/69562e7acf12f80008f0ce28
😎 Deploy Preview https://deploy-preview-680--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

pkg-pr-new Bot commented Dec 31, 2025

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/tsdown@680
npm i https://pkg.pr.new/create-tsdown@680
npm i https://pkg.pr.new/tsdown-migrate@680

commit: 35b0ff2

@sxzz sxzz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

exports need to be determined based on the chunk, not just the CSS configuration and outDir.

The filename and outDir could be overridden by plugins/outputOptions.

Comment thread src/features/pkg/exports.test.ts
@jinghaihan
jinghaihan marked this pull request as draft January 1, 2026 04:23
@jinghaihan
jinghaihan marked this pull request as ready for review January 1, 2026 04:28
@jinghaihan
jinghaihan requested a review from sxzz January 1, 2026 04:29
Comment thread src/features/pkg/exports.ts Outdated
Comment thread src/features/pkg/exports.ts Outdated
Comment thread src/features/pkg/exports.ts Outdated
@jinghaihan
jinghaihan requested a review from sxzz January 1, 2026 06:19
@sxzz
sxzz merged commit b737c28 into rolldown:main Jan 1, 2026
16 checks passed
@jinghaihan
jinghaihan deleted the feat/exports-merged-css branch January 1, 2026 12:14
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.

2 participants