这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@ocavue
Copy link
Collaborator

@ocavue ocavue commented Nov 19, 2023

This PR fixes a bug when using the --experimental-dts.

Let's say we have the following file structure:

// src/shared.ts
export const declare1 = 'declare1'
export const declare2 = 'declare2'

// src/entry1.ts
export { declare1 } from './shared'

// src/entry2.ts
export { declare2 } from './shared'

In this example, entry1.ts and entry2.ts are public entry files. In the generated entry1.d.ts, it should only contain declare1, and entry2.d.ts should only contain declare2. However, the generated entry1.d.ts and entry2.d.ts incorrectly contain both declare1 and declare2.

This PR fixes this bug and adds a test case.

@vercel
Copy link

vercel bot commented Nov 19, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
tsup ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 19, 2023 4:09pm

@codesandbox
Copy link

codesandbox bot commented Nov 19, 2023

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders

Open Preview

@ocavue ocavue marked this pull request as ready for review November 20, 2023 04:22
@ocavue ocavue requested review from egoist and sxzz November 20, 2023 04:22
@ocavue ocavue merged commit 731f43f into dev Nov 20, 2023
@ocavue ocavue deleted the ocavue/fix-exp-dts branch November 20, 2023 07:45
@github-actions
Copy link
Contributor

🎉 This PR is included in version 8.0.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants