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

vite-ts模版提个建议 #55

Open
z-sq opened this issue Jul 26, 2022 · 0 comments
Open

vite-ts模版提个建议 #55

z-sq opened this issue Jul 26, 2022 · 0 comments

Comments

@z-sq
Copy link

z-sq commented Jul 26, 2022

uniapp类型@dcloudio/typestsconfig.json的types放到env.d.ts里;

// env.d.ts 文件

/// <reference types="vite/client" />
/// <reference types="@dcloudio/types" />

原因:指定types配置,失去了ts自动包含@types里的所有包的特性,导致使用其他包声明(如lodash、express)都得在types里配置

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

No branches or pull requests

1 participant