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(create-vite): remove redundant tsconfig include configuration #14256

Merged
merged 2 commits into from
Sep 4, 2023

Conversation

alex12306
Copy link
Contributor

@alex12306 alex12306 commented Sep 1, 2023

Description

The "src/**/*.d.ts" configuration seems redundant.
Because "src/**/*.ts" can actually match to .d.ts files.
The description of include configuration on the Typescript official website is: "e.g. .ts, .tsx, and .d.ts by default", but this does not mean that after you configure include in tsconfig.json, you must put "src/**/*.ts" and "src/**/*.d.ts" are configured.
I have tested that "src/**/*.ts" can match the .d.ts file in the project.
Or is this intentionally set by the vite team so that developers can directly see that the .d.ts file can be resolved by Typescript?

Additional context


What is the purpose of this pull request?

  • Bug fix
  • New Feature
  • Documentation update
  • Other

Before submitting the PR, please make sure you do the following

  • Read the Contributing Guidelines.
  • Read the Pull Request Guidelines and follow the PR Title Convention.
  • Check that there isn't already a PR that solves the problem the same way to avoid creating a duplicate.
  • Provide a description in this PR that addresses what the PR is solving, or reference the issue that it solves (e.g. fixes #123).
  • Ideally, include relevant tests that fail without this PR but pass with it.

@stackblitz
Copy link

stackblitz bot commented Sep 1, 2023

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@bluwy
Copy link
Member

bluwy commented Sep 4, 2023

Looks good to me, can you make the same change for the svelte template too?

"include": ["src/**/*.d.ts", "src/**/*.ts", "src/**/*.js", "src/**/*.svelte"],

@bluwy bluwy added the p2-nice-to-have Not breaking anything but nice to have (priority) label Sep 4, 2023
@bluwy bluwy changed the title fix(create-vite): redundant configuration fix(create-vite): remove redundant tsconfig include configuration Sep 4, 2023
@alex12306
Copy link
Contributor Author

Looks good to me, can you make the same change for the svelte template too?

"include": ["src/**/*.d.ts", "src/**/*.ts", "src/**/*.js", "src/**/*.svelte"],

Of course, if you guys think it would help

@bluwy bluwy merged commit 6ea34cc into vitejs:main Sep 4, 2023
10 checks passed
@bluwy
Copy link
Member

bluwy commented Sep 4, 2023

Thanks!

@alex12306 alex12306 deleted the fix-template branch September 4, 2023 09:48
bluwy added a commit to bluwy/create-vite-extra that referenced this pull request Nov 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p2-nice-to-have Not breaking anything but nice to have (priority)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants