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 和 vue3 #62

Open
CongratulateWE opened this issue Jan 26, 2021 · 0 comments
Open

vite 和 vue3 #62

CongratulateWE opened this issue Jan 26, 2021 · 0 comments
Labels
vue vue vuex vueRouter

Comments

@CongratulateWE
Copy link
Owner

使用 vitejs 的 vue-ts 模板初始化一个项目后,可以正常运行,就是在 main.ts 中有一个语法提示错误:Cannot find module './App.vue' or its corresponding type declarations.ts(2307)

image

参考这个issue代码,添加 shims-vue.d.ts,错误提示就消失了,这个是什么机制?

declare module '*.vue' {
    import { ComponentOptions } from 'vue'
    const component: ComponentOptions
    export default component
}
@CongratulateWE CongratulateWE added the vue vue vuex vueRouter label Jan 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
vue vue vuex vueRouter
Projects
None yet
Development

No branches or pull requests

1 participant