Skip to content

Conversation

hi-ogawa
Copy link
Contributor

@hi-ogawa hi-ogawa commented Aug 25, 2025

Description

The latest Node 22 supports ts without a flag. I haven't gone through the whole process but pnpm release starts fine locally.

@hi-ogawa hi-ogawa marked this pull request as ready for review August 25, 2025 05:31
@hi-ogawa hi-ogawa requested a review from sapphi-red August 25, 2025 05:49
@sapphi-red
Copy link
Member

I think we should set erasableSyntaxOnly: true in scripts/tsconfig.json. Also change module to nodenext and remove moduleResolution.

@hi-ogawa
Copy link
Contributor Author

I update tsconfig to align with https://nodejs.org/docs/v22.18.0/api/typescript.html#type-stripping

@ArnaudBarre
Copy link
Member

In my experience rewriteRelativeImportExtensions is not needed, that's the goal of this feature, stop messing with import and just import the file as written in the import

@hi-ogawa
Copy link
Contributor Author

I was confused about that too, but probably rewriteRelativeImportExtensions or allowImportingTsExtensions needs to be enabled for tsc to resolve explicit ts import like import "./dep.ts"?

@sapphi-red
Copy link
Member

rewriteRelativeImportExtensions is for a setup like "run TS directly with Node + compile to JS by tsc". For our case, either rewriteRelativeImportExtensions or allowImportingTsExtensions are fine. But maybe allowImportingTsExtensions is more easy to recognize the need.

@hi-ogawa
Copy link
Contributor Author

Good to know 👍 I changed it to allowImportingTsExtensions.

@hi-ogawa hi-ogawa merged commit 1a07a8a into main Aug 25, 2025
19 of 20 checks passed
@hi-ogawa hi-ogawa deleted the 08-25-chore_remove_tsx branch August 25, 2025 22:58
@hi-ogawa
Copy link
Contributor Author

Release worked! https://github.com/vitejs/vite-plugin-react/actions/runs/17223385585/job/48863263835

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.

3 participants