Skip to content

fix: add vite-plus/pack/client export as tsdown/client equivalent#1501

Draft
naokihaba wants to merge 7 commits intovoidzero-dev:mainfrom
naokihaba:fix/1500
Draft

fix: add vite-plus/pack/client export as tsdown/client equivalent#1501
naokihaba wants to merge 7 commits intovoidzero-dev:mainfrom
naokihaba:fix/1500

Conversation

@naokihaba
Copy link
Copy Markdown
Collaborator

resolves #1500

@netlify
Copy link
Copy Markdown

netlify Bot commented Apr 29, 2026

Deploy Preview for viteplus-preview canceled.

Name Link
🔨 Latest commit b31985a
🔍 Latest deploy log https://app.netlify.com/projects/viteplus-preview/deploys/69f22ee0046d330008229649

Comment on lines +25 to +26
expect(content).toContain('ImportMeta');
expect(content).toContain('glob');
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.

I've added some tests to handle file copying and validation based on tsdown/client.d.ts to make sure everything is working as expected.

https://github.com/rolldown/tsdown/blob/main/client.d.ts#L35-L58

@naokihaba naokihaba self-assigned this Apr 29, 2026
@naokihaba naokihaba marked this pull request as ready for review April 29, 2026 14:24
@naokihaba
Copy link
Copy Markdown
Collaborator Author

@codex review

@naokihaba naokihaba marked this pull request as draft April 29, 2026 14:26
@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. More of your lovely PRs please.

ℹ️ 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".

@naokihaba naokihaba marked this pull request as ready for review April 29, 2026 14:32
@naokihaba naokihaba requested a review from fengmk2 April 29, 2026 14:32
Comment thread packages/core/package.json
@naokihaba naokihaba marked this pull request as draft April 29, 2026 15:08
@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: b9de06aa28

ℹ️ 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".

Comment thread crates/vite_migration/src/import_rewriter.rs
@naokihaba
Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 👍

ℹ️ 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".

@naokihaba naokihaba marked this pull request as ready for review April 29, 2026 16:24
@naokihaba naokihaba requested a review from fengmk2 April 29, 2026 16:27
@fengmk2
Copy link
Copy Markdown
Member

fengmk2 commented Apr 30, 2026

@naokihaba I just searched the global code on github again and found that there is already usage of importing tsdown/client in ts code, which needs to be supported in the migrate https://github.com/Tarrowren/css-class-intellisense/blob/9ff9838a4364c458b4f486b4c91dd77dc1fb5acf/lezer/less/test/test-less.ts#L1

Then we can create a new issue to handle the previously unimplemented todo items for tsconfig.json together, and rewrite both vite/client and tsdown/client https://github.com/ascorbic/cirrus/blob/98aec98dc56de58f8d6010565cef6cfc5c62311e/packages/pds/tsconfig.json#L5

@naokihaba
Copy link
Copy Markdown
Collaborator Author

@naokihaba I just searched the global code on github again and found that there is already usage of importing tsdown/client in ts code, which needs to be supported in the migrate https://github.com/Tarrowren/css-class-intellisense/blob/9ff9838a4364c458b4f486b4c91dd77dc1fb5acf/lezer/less/test/test-less.ts#L1

Then we can create a new issue to handle the previously unimplemented todo items for tsconfig.json together, and rewrite both vite/client and tsdown/client https://github.com/ascorbic/cirrus/blob/98aec98dc56de58f8d6010565cef6cfc5c62311e/packages/pds/tsconfig.json#L5

Thank you for checking!

I understand that if these aren't rewritten during migration, they will break once tsdown is removed as a dependency — TypeScript won't be able to find the types, and imports will fail.

I'll create a new issue to cover both:

  • Rewriting import "tsdown/client" in .ts files
  • Rewriting "types": ["vite/client"] and "types": ["tsdown/client"] in tsconfig.json

@naokihaba
Copy link
Copy Markdown
Collaborator Author

@fengmk2
This matter will be addressed in the following issue.
#1502

I will set this PR to draft for now.

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.

no tsdown/client equivalent

2 participants