Skip to content

fix(exports): scope inlined dependencies to configs with exports - #1040

Merged
sxzz merged 2 commits into
rolldown:mainfrom
lazerg:fix/issue-1039-inlined-deps-scope
Jul 31, 2026
Merged

fix(exports): scope inlined dependencies to configs with exports#1040
sxzz merged 2 commits into
rolldown:mainfrom
lazerg:fix/issue-1039-inlined-deps-scope

Conversation

@lazerg

@lazerg lazerg commented Jul 29, 2026

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

Description

When several build configs share one package.json and only some enable exports, the generated inlinedDependencies field pulled inlined deps from every config for that package, including ones that never contribute to the exports map. So a config that bundles everything (say a standalone binary excluded from files) leaked its inlined packages into the library's published package.json, even though the library externalizes those same packages.

The fix scopes the merge to the bundles the exports map is built from, so inlinedDependencies only lists deps that an exports config actually inlines.

Linked Issues

Fixes #1039

Additional context

Added a regression test with a two-config setup (one library config with exports, one bundle-everything config without) asserting the inlined dep from the second no longer appears in the package's inlinedDependencies.

@netlify

netlify Bot commented Jul 29, 2026

Copy link
Copy Markdown

Deploy Preview for tsdown-main ready!

Name Link
🔨 Latest commit b17d386
🔍 Latest deploy log https://app.netlify.com/projects/tsdown-main/deploys/6a6bea4157888d00079501a5
😎 Deploy Preview https://deploy-preview-1040--tsdown-main.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

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

@pkg-pr-new

pkg-pr-new Bot commented Jul 29, 2026

Copy link
Copy Markdown

Open in StackBlitz

tsdown

pnpm add https://pkg.pr.new/tsdown@1040 -D
npm i https://pkg.pr.new/tsdown@1040 -D
yarn add https://pkg.pr.new/tsdown@1040.tgz -D

create-tsdown

pnpm add https://pkg.pr.new/create-tsdown@1040 -D
npm i https://pkg.pr.new/create-tsdown@1040 -D
yarn add https://pkg.pr.new/create-tsdown@1040.tgz -D

@tsdown/css

pnpm add https://pkg.pr.new/@tsdown/css@1040 -D
npm i https://pkg.pr.new/@tsdown/css@1040 -D
yarn add https://pkg.pr.new/@tsdown/css@1040.tgz -D

@tsdown/exe

pnpm add https://pkg.pr.new/@tsdown/exe@1040 -D
npm i https://pkg.pr.new/@tsdown/exe@1040 -D
yarn add https://pkg.pr.new/@tsdown/exe@1040.tgz -D

tsdown-migrate

pnpm add https://pkg.pr.new/tsdown-migrate@1040 -D
npm i https://pkg.pr.new/tsdown-migrate@1040 -D
yarn add https://pkg.pr.new/tsdown-migrate@1040.tgz -D

commit: b17d386

Comment thread tests/e2e.test.ts Outdated
@sxzz
sxzz merged commit d5b8015 into rolldown:main Jul 31, 2026
16 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.

inlinedDependencies leaks from configs that don't declare exports

2 participants