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

希望增加生成声明文件的命令 #496

Open
3 tasks done
WangJincheng4869 opened this issue May 11, 2024 · 1 comment
Open
3 tasks done

希望增加生成声明文件的命令 #496

WangJincheng4869 opened this issue May 11, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@WangJincheng4869
Copy link

Clear and concise description of the problem

目前自动导入的逻辑是需要访问页面才能生成对应的声明,这样就会导致在 build 的时候会报错。

图片

Suggested solution

如果能在 build 之前调用一下下生成导入就不会有这个问题。

 "scripts": {
    "build": "auto-import && vue-tsc --noEmit && vite build",
  }

Alternative

No response

Additional context

No response

Validations

@l246804
Copy link

l246804 commented May 30, 2024

这是 vue-tsc --noEmit 检查出的问题,我理解 unplugin-auto-import 依赖于 vite 的模块扫描,不运行 vite 就没法生成类型文件吧?所以我直接都是构建时删掉类型检查,需要时(提交代码)再自动检查类型😂。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants