Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(typescript): improve accuracy of runTsc extensions parameter behavior #222

Merged
merged 3 commits into from
Jul 4, 2024

Conversation

johnsoncodehk
Copy link
Member

@johnsoncodehk johnsoncodehk commented Jul 4, 2024

This PR will solve the error TS5055: Cannot write file 'xxx/yyy.vue.d.ts' because it would overwrite input file. error, and the problem that --clean cannot clean the .vue.d.ts file.

Details

  • extra extensions need to be added to the first group of supportedTSExtensions, which will make tsc think that .vue and .vue.d.ts are associated file types, thus solving the problem that .vue and .vue.d.ts are considered multiple source file problem.
  • Extra extensions need to be located in front of .d.ts. tsc depends on the order to determine the priority of .vue and .vue.d.ts.
  • Patch changeExtension to resolve tsc not knowing it should convert xxx.vue to xxx.vue.d.ts instead of xxx.d.ts.

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