unplugin-vue-components
unplugin-vue-components copied to clipboard
auto import components with vuetify
Describe the bug
引入vuetify的时候, 源码是直接引入"vuetify/components"的, 但是这个文件下有很多不必要的引入, 在开发环境中会引入很多不想干的css,
建议把这个代码修改成下面的, 在开发环境下不会引入其他css
function Vuetify3Resolver() {
return {
type: "component",
resolve: (name) => {
if (name.match(/^V[A-Z]/))
return {name, from: "vuetify/components"};
}
};
}
function Vuetify3Resolver() {
return {
type: "component",
resolve: (name) => {
if (name.match(/^V[A-Z]/))
return {name, from: "vuetify/components/"+ name};
}
};
}
Reproduction
System Info
windows 10
Used Package Manager
pnpm
Validations
- [X] Follow our Code of Conduct
- [X] Read the Contributing Guide.
- [X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- [X] Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
- [X] The provided reproduction is a minimal reproducible of the bug.
现在可以使用建议的插件:vite-plugin-vuetify
现在可以使用建议的插件:vite-plugin-vuetify
okok 谢谢