Repository navigation
feat!: merge emitDtsOnly and dtsInput into dtsOnly - #340
Merged
Merged
Conversation
commit: |
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
sxzz
approved these changes
Nov 4, 2026
2 of 3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
AI usage
Description
Adds a
dtsOnlyoption for declaration-only builds, replacingemitDtsOnlyanddtsInput. Entries may be source files,.d.tsfiles, or both.With
dtsOnly, each source entry resolves to its declaration module, so the build no longer emits a stub JS chunk and deletes it afterwards. Source modules are only loaded to provide code for the generator and stay out of every chunk.emitDtsOnlyanddtsInputare deprecated aliases ofdtsOnlyand log a warning.entrycannot be combined withdtsOnly; set Rolldowninputinstead.emitJs(jsdoc in jsis no longer an expected failure).treeshake: false, drops imports of the Rolldown runtime from declarations: the runtime chunk import, which pointed to a removed chunk, and thecreateRequireimport left by an inlined runtime.sideEffects: false, a declaration-only build now treats only external modules as side-effect free (moduleSideEffects: 'no-external'), sodeclare globalin side-effect imports is kept. The setting also applies when the user setstreeshake, which previously overrode it.Linked Issues
Additional context
Breaking:
dtsOnlywithentrythrows, including through the deprecated aliases. tsdown passesdts.entrytogether withemitDtsOnlyfor CJS declaration builds, so it needs to stop passingentrythere before it upgrades to this release.