Skip to content

feat(migration): rewrite tsdown/client and vite/client in tsconfig compilerOptions.types#1542

Open
naokihaba wants to merge 6 commits intovoidzero-dev:mainfrom
naokihaba:fix/1502-rewrite-tsconfig-types
Open

feat(migration): rewrite tsdown/client and vite/client in tsconfig compilerOptions.types#1542
naokihaba wants to merge 6 commits intovoidzero-dev:mainfrom
naokihaba:fix/1502-rewrite-tsconfig-types

Conversation

@naokihaba
Copy link
Copy Markdown
Collaborator

@naokihaba naokihaba commented May 9, 2026

resolves #1502

This PR depends on #1501. When merging, #1501, #1541, and #1542 must be merged together.

I considered consolidating this into #1501, but I have separated it into a different PR because the scope of concerns would become too broad. I can make adjustments if this is not ideal from a merge strategy perspective.

I have separated these to reduce the review burden that would result from mixing Rust and TypeScript concerns in a single PR.

@netlify
Copy link
Copy Markdown

netlify Bot commented May 9, 2026

Deploy Preview for viteplus-preview ready!

Name Link
🔨 Latest commit 4aca829
🔍 Latest deploy log https://app.netlify.com/projects/viteplus-preview/deploys/69ff41017476fa0008f130a9
😎 Deploy Preview https://deploy-preview-1542--viteplus-preview.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.

@naokihaba naokihaba self-assigned this May 9, 2026
@naokihaba
Copy link
Copy Markdown
Collaborator Author

@codex review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 299a3f8bd0

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

}

const REPLACEMENTS: Record<string, string> = {
'tsdown/client': 'vite-plus/pack/client',
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Do not rewrite tsdown/client to an unexported subpath

When a project has compilerOptions.types: ["tsdown/client"], this rewrites it to vite-plus/pack/client, but the CLI package only exports ./pack and not ./pack/client (packages/cli/package.json lines 78-80), so TypeScript reports TS2688: Cannot find type definition file for 'vite-plus/pack/client' and migrated projects lose typechecking. The existing Rust reference-type migrator also documents this exact case as not rewritten because vite-plus has no tsdown subpath export (crates/vite_migration/src/import_rewriter.rs lines 2466-2471).

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

This has already been implemented in #1501, and this PR depends on #1501.

@naokihaba naokihaba force-pushed the fix/1502-rewrite-tsconfig-types branch from 299a3f8 to d01b647 Compare May 9, 2026 14:03
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.

migrate: rewrite tsdown/client and vite/client in TS imports and tsconfig.json types array

1 participant