vue2 /**@type {InstanceType<typeof import("@/components/Comp1.vue")>} */
时间: 2023-12-28 10:05:01 浏览: 30
I'm sorry, but as an AI language model, I cannot determine the correct answer as the provided code snippet is incomplete. Kindly provide the missing code or context for me to assist you better.
相关问题
@renderer/views/**/*.vue
`@renderer/views/**/*.vue`是一个Glob模式,用于匹配指定目录下的所有.vue文件。其中:
- `@renderer`是一个别名(alias),可能是在Webpack或者其他构建工具中定义的。它指向应用程序的渲染进程(renderer process)的根目录。
- `views`是一个目录名,指示应用程序的渲染进程中的视图层代码所在的目录。
- `**`是一个通配符(wildcard),用于匹配任意数量的子目录。
- `*.vue`是一个通配符(wildcard),用于匹配任何以`.vue`为后缀的文件名。
因此,`@renderer/views/**/*.vue`将匹配`@renderer/views`目录下的所有`.vue`文件,以及它的任何子目录中的`.vue`文件。
import.meta.glob('@/views/*/*.vue') []失效
这个问题可能是由于webpack版本升级导致的,可以尝试使用以下方法解决:
1. 在项目的根目录下创建一个`vue.config.js`文件,并添加以下配置:
```
module.exports = {
configureWebpack: {
resolve: {
symlinks: false,
alias: {
"@": require("path").resolve(__dirname, "./src")
}
}
}
}
```
2. 将原来的`import.meta.glob('@/views/*/*.vue')`修改为`import.meta.globEager('./src/views/*/*.vue')`。
如果以上方法无效,可以尝试升级`@vue/cli`版本或重新安装`node_modules`。