Skip to content

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

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

feat: generate CSS exports when css.splitting is disabled#680
sxzz merged 10 commits intorolldown: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
Copy link
Copy Markdown

netlify bot commented Dec 31, 2025

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
Copy link
Copy Markdown

pkg-pr-new bot commented Dec 31, 2025

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 force-pushed the feat/exports-merged-css branch from 3d3f0b2 to b1ac8c2 Compare December 31, 2025 19:41
@sxzz sxzz force-pushed the feat/exports-merged-css branch from 7793350 to 61ca7eb Compare December 31, 2025 19:44
Copy link
Copy Markdown
Member

@sxzz sxzz left a comment

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.

@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
@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