Skip to content

fix: vite client types#7877

Merged
patak-cat merged 3 commits intovitejs:mainfrom
poyoho:fix/vite-client-types
May 5, 2022
Merged

fix: vite client types#7877
patak-cat merged 3 commits intovitejs:mainfrom
poyoho:fix/vite-client-types

Conversation

@poyoho
Copy link
Copy Markdown
Member

@poyoho poyoho commented Apr 23, 2022

Description

fix: #3905

Additional context

I remove the /// <reference lib="dom" />, it can run. I think we can remove it. Let users add dom / webworker in tsconfig.json to determine env. And the create-vite is also define {"lib": ["dom"]}


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 Commit 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.

sapphi-red
sapphi-red previously approved these changes Apr 27, 2022
Copy link
Copy Markdown
Member

@sapphi-red sapphi-red left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bluwy
bluwy previously approved these changes Apr 27, 2022
Copy link
Copy Markdown
Member

@bluwy bluwy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like a good solution to me too. I think we could merge in Vite 3 to not accidentally break existing project typechecking.

@bluwy bluwy added the p2-nice-to-have Not breaking anything but nice to have (priority) label Apr 27, 2022
@bluwy bluwy added this to the 3.0 milestone Apr 27, 2022
@patak-cat
Copy link
Copy Markdown
Member

Should we add a note in the docs about how to let users add dom / webworker in tsconfig.json to determine env?

@poyoho poyoho dismissed stale reviews from bluwy and sapphi-red via 22896e4 May 5, 2022 14:52
@patak-cat patak-cat requested a review from bluwy May 5, 2022 14:53
Co-authored-by: Bjorn Lu <[email protected]>
@patak-cat patak-cat merged commit 0e67fe8 into vitejs:main May 5, 2022
@poyoho poyoho deleted the fix/vite-client-types branch May 6, 2022 01:07
@poyoho poyoho mentioned this pull request May 21, 2022
9 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking change 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.

client types are incompatible with 'webworker' lib

4 participants