This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The reason will be displayed to describe this comment to others. Learn more.
When vite/client or vite/import-meta is used from a file using moduleResolution: "nodenext", this import needs to be vite/client/types or vite/client/types.js... (vitepress uses moduleResolution: "nodenext")
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.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.
Description
Moved
d.ts
files undertypes
tosrc/dep-types
andsrc/types
and use api-extractor to bundle client types.This solves following issues:
'vite'
and'types/*'
types
directory is not included inexports
field but was included in packagetypes
directory included dep types and it was a bit hard to differentiate types of deps or notvite/types/importMeta
can be imported byvite/import-meta
or importViteImportMeta
type fromvite/client/types
This PR deprecates:
import 'vite/types/*'
import 'vite/client/types'
orimport 'vite'
import { /* import.meta.glob related types */ } from 'vite'
(related: vite config files can't be compiled withoutdom
types #9813)import 'vite/client/types'
I added facade files under
types
directory so there should be backward compatibility.Additional context
https://vitejs.dev/guide/api-plugin.html#typescript-for-custom-events
This example was not working for
server.ws.send('custom:foo', { msg: 'foo' })
. So I updated the docs.What is the purpose of this pull request?
Before submitting the PR, please make sure you do the following
fixes #123
).