Closed kaikaibenkai closed 1 year ago
Is there a reason why you would want to use this plugin in Nuxt?
Is there a reason why you would want to use this plugin in Nuxt?
Because auto-import of Arco Design only supports this plugin, if I use Nuxt auto-import, I must fully import Arco Design, causing the package volume to expand.
hi, you can try:
export default defineNuxtConfig({
ssr: false,
components: false,
vite: {
plugins: [
Components({
dts: true,
dirs: ['components'],
directoryAsNamespace: true,
resolvers: [
ArcoResolver({ resolveIcons: true }),
],
}),
],
},
});
{
// https://nuxt.com/docs/guide/concepts/typescript
"extends": "./.nuxt/tsconfig.json",
"include": [
"./.nuxt/nuxt.d.ts",
"**/*"
]
}
@lishaobos Thank you. I used the first patch and now it works very well!
~~Oh no, it is broken😢
I can't see any type info of components/*
in components/foo/bar/comp.vue
~~
reloaded Volar and fixed
Describe the bug
If enable
unplugin-vue-components
, the types of components that are auto-imported by Nuxt is lost.Reproduction
https://github.com/kaikaibenkai/unplugin-vue-components-demo-657
System Info
Used Package Manager
pnpm
Validations