fix: remove picomatch type import (fixes #10656) #10678
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
The type script script was somehow resolving
node_modules/@types
in the root of monorepo and this is the reason why we didn't notice this. I've updated thetsconfig.json
to detect this case.Type import of
picomatch
was included inindex.d.ts
but was not used, because the prop that uses this type was marked as internal. (internal properties are removed from the output)vite/packages/vite/src/node/server/index.ts
Lines 300 to 304 in 675bf07
Since we don't use them, I added some codes in
postPatchTypes.ts
to remove that type import.fixes #10656
superseds close #10672
Additional context
What is the purpose of this pull request?
Before submitting the PR, please make sure you do the following
fixes #123
).