29 lines
846 B
JavaScript
29 lines
846 B
JavaScript
|
import Components from 'unplugin-vue-components/vite'
|
|||
|
import { NaiveUiResolver } from 'unplugin-vue-components/resolvers'
|
|||
|
import { FileSystemIconLoader } from 'unplugin-icons/loaders'
|
|||
|
import IconsResolver from 'unplugin-icons/resolver'
|
|||
|
|
|||
|
/**
|
|||
|
* * unplugin-icons插件,自动引入iconify图标
|
|||
|
* usage: https://github.com/antfu/unplugin-icons
|
|||
|
* 图标库: https://icones.js.org/
|
|||
|
*/
|
|||
|
import Icons from 'unplugin-icons/vite'
|
|||
|
|
|||
|
import { getRootPath } from '../utils'
|
|||
|
|
|||
|
const customIconPath = getRootPath('src', 'assets/icons')
|
|||
|
export default [
|
|||
|
Icons({
|
|||
|
compiler: 'vue3',
|
|||
|
customCollections: {
|
|||
|
custom: FileSystemIconLoader(customIconPath),
|
|||
|
},
|
|||
|
scale: 1,
|
|||
|
defaultClass: 'inline-block',
|
|||
|
}),
|
|||
|
Components({
|
|||
|
resolvers: [NaiveUiResolver(), IconsResolver({ customCollections: ['custom'], componentPrefix: 'icon' })],
|
|||
|
}),
|
|||
|
]
|