vuepress / core

Vue-Powered Static Site Generator
https://vuepress.vuejs.org
MIT License
2.17k stars 923 forks source link

[Bug report] vue 项目中,引入 src 目录下的 组件 报错 ts(2307) #1368

Closed WangJincheng4869 closed 1 year ago

WangJincheng4869 commented 1 year ago

Description

我是在 vue 项目中使用文档,如果引用 docs\.vuepress\components 下的组件是没有问题的

但是如果 引入 src\components 下的组件就会报错 ts(2307)

image

image

在手写 import 时 IDE 不会提示带有 .vue 的文件

image image

Reproduction

https://stackblitz.com/edit/vuepress-khny5y?file=package.json

Used Package Manager

pnpm

System Info

System:
    OS: Windows 10 10.0.22621
    CPU: (12) x64 Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz
    Memory: 16.30 GB / 31.56 GB
  Binaries:
    Node: 18.14.2 - D:\Program Files\nodejs\node.EXE
    Yarn: Not Found
    npm: 9.2.0 - D:\Users\jcwang\AppData\Roaming\npm\npm.CMD
  Utilities:
    Git: 2.41.0.
  Browsers:
    Chrome: Not Found
    Edge: Spartan (44.22621.1928.0), Chromium (114.0.1823.58)
  npmPackages:
    @vuepress/bundler-vite: 2.0.0-beta.63 => 2.0.0-beta.63
    @vuepress/plugin-search: Not Found
    @vuepress/plugin-shiki: Not Found
    @vuepress/plugin-theme-data: Not Found
    @vuepress/plugin-toc: Not Found
    @vuepress/shared: Not Found
    @vuepress/theme-default: Not Found
    @vuepress/utils: Not Found
    vue: ^3.3.4 => 3.3.4
    vue-loader: Not Found
    vue-router: ^4.2.2 => 4.2.2
    vuepress: 2.0.0-beta.63 => 2.0.0-beta.63
    vuepress-vite: Not Found
    vuepress-webpack: Not Found
Mister-Hope commented 1 year ago

Closing as we can not see a VALID REPRODUCTION.

Try not to fool open source developers.

github-actions[bot] commented 1 year ago

Hello @WangJincheng4869. Please provide a minimal reproduction using a GitHub repository or v2.vuepress.vuejs.org/new. Issues marked with need reproduction will be closed if they have no activity within 7 days.

WangJincheng4869 commented 1 year ago

Closing as we can not see a VALID REPRODUCTION.

Try not to fool open source developers.

最小的复制(此 bug 只能才 VSCode 中触发):

https://github.com/WangJincheng4869/fanKuiWenJian/blob/main/vuepress-next-bug.zip

image