Skip to content
This repository was archived by the owner on Sep 20, 2024. It is now read-only.

Commit e6b61e6

Browse files
committed
chore: update vite cofig
1 parent 6ed8807 commit e6b61e6

File tree

1 file changed

+2
-13
lines changed

1 file changed

+2
-13
lines changed

vite.config.ts

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { defineConfig } from 'vite'
22
import vue from '@vitejs/plugin-vue'
33
import ComponentsPlugin from 'vite-plugin-components'
44
import Pages from 'vite-plugin-pages'
5-
import kebabCase from 'lodash.kebabcase'
5+
import { componentResolver } from '@chakra-ui/vue-auto-import'
66
import path from 'path'
77

88
export default defineConfig({
@@ -32,18 +32,7 @@ export default defineConfig({
3232
},
3333
}),
3434
ComponentsPlugin({
35-
customComponentResolvers: [
36-
/**
37-
* Handle auto-imports from @chakra-ui/vue-next
38-
*/
39-
(name: string) => {
40-
if (kebabCase(name).startsWith('c-'))
41-
return {
42-
importName: name,
43-
path: `@chakra-ui/vue-next`,
44-
}
45-
},
46-
],
35+
customComponentResolvers: [componentResolver],
4736
}),
4837
],
4938
})

0 commit comments

Comments
 (0)