-
Notifications
You must be signed in to change notification settings - Fork 7
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
Cannot find module '~virtual/svg-component' or its corresponding type declarations. #18
Comments
Have you set |
@upleave 可以提供一个最小的复现demo吗? |
svg-component.d.ts 和 svg-component-global.d.ts 文件生成出来后就没问题了,可能是我添加 谢谢解答! |
你好,请问 |
@heavenly-zy 试试设置 |
设置了 |
@heavenly-zy 需要启动之后访问项目才会生成, 因为是在 configureServer 钩子生成的 type. |
好的,感谢,现在可以了,之前我一直以为是只要开启了 dev server 就会生成,才知道还需要访问页面;这个有办法优化为只要开启 dev server 就生成吗? |
确实是可以这样优化的. |
@heavenly-zy 最新版本已优化为开启server 就会生成. |
I built vue2 in webpack5 using typescript patterns, and when introducing ~virtual/svg-component in main.ts, Cannot find module '~virtual/svg-component' or its corresponding type declarations is displayed. You should add a type declaration to the webpack.
The text was updated successfully, but these errors were encountered: