feat(config): add an entry without pack types - #2679
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
|
@fouteox Can I get more details about the reason for this change? Could you describe what problem you encountered? |
|
Thanks, I should have included the original failure. This came from a Laravel/Inertia/React application that uses Vite+ for its frontend, without import { defineConfig } from 'vite-plus';
export default defineConfig({
build: { sourcemap: true },
fmt: { semi: true },
});With both I rechecked with both packages at 0.3.1 from npm, and this example already passes. The bundled declarations now contain targeted The remaining difference is which declarations TypeScript loads. With 0.3.1, Given that 0.3.1 already resolves the failure, I don't have a strong enough use case to justify another public entry. I'm closing this PR. Thanks for asking for the concrete example. |
Importing
defineConfigfromvite-plusbrings tsdown's declarations into the project, even when it never usesvp pack.vite-plus/configexposes the existing configuration helpers without the pack augmentation. The root entry keeps its current behavior by re-exporting the types fromvite-plus/pack. Static extraction and migrations recognize the new entry; a migration that adds pack switches the import back to the root.The two native CLI snapshots check the installed packages, strict TypeScript 7, static execution and ESM/CommonJS identity. Pack integrations are checked with TypeScript 6. The 1,210 JavaScript tests, 429 affected Rust tests, repository type checks and formatting pass; the full cross-platform snapshot matrix has not been run locally.
Importing the root or pack entry elsewhere in the same TypeScript program still loads the augmentation. This leaves the optional integrations' declarations unchanged. OXC #20416 previously suggested
/configfor another API, so the entry's name and scope need maintainer agreement.