Skip to content

Comments

feat(workspace): enable tsdown dev exports for editor DX#3019

Draft
anymaniax wants to merge 2 commits intomasterfrom
feature/package-exports-dev
Draft

feat(workspace): enable tsdown dev exports for editor DX#3019
anymaniax wants to merge 2 commits intomasterfrom
feature/package-exports-dev

Conversation

@anymaniax
Copy link
Collaborator

@anymaniax anymaniax commented Feb 22, 2026

Summary

  • Enable tsdown devExports for improved editor DX — go-to-definition now resolves to .ts source files across packages instead of .d.mts declarations

Changes

  • Change exports: true to exports: { devExports: true } in packages/tsdown.base.ts
  • Auto-generated publishConfig.exports in all 13 package.json files pointing to built output for publishing
  • Top-level exports now point to source .ts files for local development
  • Zero changes to import paths — moduleResolution: "bundler" handles extensionless imports

Summary by CodeRabbit

  • Chores
    • Updated package module resolution to support conditional development and production entry points across all packages
    • Enhanced build configuration to enable more efficient module resolution during development
    • Improved package publishing configuration to ensure correct build artifacts are distributed to end-users

Copilot AI review requested due to automatic review settings February 22, 2026 19:58
@anymaniax anymaniax marked this pull request as draft February 22, 2026 19:59
@coderabbitai
Copy link

coderabbitai bot commented Feb 22, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • ✅ Review completed - (🔄 Check again to review again)
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feature/package-exports-dev

Tip

Issue Planner is now in beta. Read the docs and try it out! Share your feedback on Discord.


Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR aims to improve editor “go-to-definition” across the monorepo by making workspace package exports resolve to TypeScript source during local development while keeping published artifacts pointing to dist.

Changes:

  • Enable tsdown devExports in the shared build config (packages/tsdown.base.ts).
  • Update package-level exports["."] to point at ./src/index.ts for local development.
  • Add publishConfig.exports entries so published packages still export ./dist/*.mjs outputs.

Reviewed changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
packages/tsdown.base.ts Enables devExports generation in the shared tsdown config.
packages/angular/package.json Switches workspace exports to src and adds publish-time exports to dist.
packages/axios/package.json Switches workspace exports to src and adds publish-time exports to dist.
packages/core/package.json Switches workspace exports to src and adds publish-time exports to dist.
packages/fetch/package.json Switches workspace exports to src and adds publish-time exports to dist.
packages/hono/package.json Switches workspace exports to src and adds publish-time exports to dist.
packages/mcp/package.json Switches workspace exports to src and adds publish-time exports to dist.
packages/mock/package.json Switches workspace exports to src and adds publish-time exports to dist.
packages/orval/package.json Switches workspace exports (including ./bin/orval) to src and adds publish-time exports to dist.
packages/query/package.json Switches workspace exports to src and adds publish-time exports to dist.
packages/solid-start/package.json Switches workspace exports to src and adds publish-time exports to dist.
packages/swr/package.json Switches workspace exports to src and adds publish-time exports to dist.
packages/zod/package.json Switches workspace exports to src and adds publish-time exports to dist.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Duplicate comments:
In `@packages/axios/package.json`:
- Around line 8-11: The exports map for the "." entry currently only defines
"development" and "default" conditions; update the package.json exports so they
follow the same publish-ready export pattern used elsewhere: add the standard
conditional keys ("import", "require", "types"/"types" entry or a "types" field
pointing to your d.ts) and ensure "development" points to the src entry while
"default" (and "import"/"require") point to the built files, and make sure
publishConfig (if used elsewhere) matches these exports; repeat the same fix for
the other exports block referenced at lines 37-41 so both export entries use the
consistent, publishable conditional export structure.

In `@packages/fetch/package.json`:
- Around line 8-11: The exports field currently exposes source files (the
"development": "./src/index.ts" mapping) which should not be published; update
the "." export so it does not point to source: either remove the "development"
conditional or change it to point to the compiled output (e.g.
"./dist/index.mjs"), ensure the "default" remains "./dist/index.mjs", and add a
"types": "./dist/index.d.ts" mapping if type declarations are published; apply
the same change to the other export blocks referenced (the entries around lines
38-42) so all exports consistently reference dist artifacts rather than src.

In `@packages/mock/package.json`:
- Around line 8-11: The exports entry for "." currently uses a nonstandard
"development" conditional and a "default" target; update the package.json to use
standard conditional exports (e.g., "import" for the ESM build and "require" for
the CJS build, with a "default" fallback if needed) and make sure the package's
publishConfig/main/module fields point to the matching built files so published
consumers resolve correctly; change the "." mapping keys from "development" to
"import" (or appropriate condition) and "default" to the correct fallback path,
and apply the same fix to the other identical export block referenced in the
diff.

In `@packages/orval/package.json`:
- Around line 15-22: The exports entries for "." and "./bin/orval" are
inconsistent with the package's publish/build outputs; update the package.json
so the "." and "./bin/orval" export fields point to the actual built artifacts
(use the built .js/.mjs/.cjs files produced in dist), add condition-specific
keys if needed (e.g., "import"/"require"), and include a "types" path if
TypeScript declarations are emitted; ensure publishConfig (and any other export
entries like the ones at lines 117-122) reference the same dist files so
development and default targets match the real build outputs.

In `@packages/zod/package.json`:
- Around line 8-11: The package.json exports entry for "." currently uses
nonstandard keys ("development" and "default")—align it with the project
convention used elsewhere by replacing those with the proper export conditions
(e.g., "import", "require", "types" or "node" entries) and ensure the
package.json includes the same publishConfig used in other packages (e.g.,
publishConfig.access) so it publishes with correct visibility; update the "."
exports object and the publishConfig accordingly and mirror the same fixes for
the duplicate block referenced at the other location (lines 37-41).

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.

1 participant