2
0
mirror of https://github.com/acepanel/panel.git synced 2026-02-04 03:07:20 +08:00
Files
panel/web/build/plugins/unplugin.ts
耗子 40cc33e61e feat: 实现图标本地加载
目前会导致打包体积失控,但是没有找到更好的方案。
2025-12-18 04:33:15 +08:00

67 lines
1.5 KiB
Go
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import AutoImport from 'unplugin-auto-import/vite'
import { NaiveUiResolver } from 'unplugin-vue-components/resolvers'
import Components from 'unplugin-vue-components/vite'
/**
* * unplugin-icons应用自动引入iconify图标
* usage: https://github.com/antfu/unplugin-icons
* 图标库: https://icones.js.org/
*/
import IconsResolver from 'unplugin-icons/resolver'
import Icons from 'unplugin-icons/vite'
export default [
AutoImport({
imports: [
'vue',
'vue-router',
'pinia',
'@vueuse/core',
{
'alova/client': [
'actionDelegationMiddleware',
'accessAction',
'createClientTokenAuthentication',
'createServerTokenAuthentication',
'updateState',
'useAutoRequest',
'useCaptcha',
'useFetcher',
'useForm',
'usePagination',
'useRequest',
'useRetriable',
'useSQRequest',
'useSSE',
'useSerialRequest',
'useSerialWatcher',
'useWatcher'
]
}
],
dts: 'types/auto-imports.d.ts',
eslintrc: {
enabled: true
},
parser: 'acorn',
vueTemplate: true,
addons: {
vueDirectives: true
},
viteOptimizeDeps: true
}),
Components({
resolvers: [
NaiveUiResolver(),
IconsResolver()
],
dts: 'types/components.d.ts'
}),
Icons({
compiler: 'vue3',
scale: 1,
defaultClass: 'inline-block',
autoInstall: true
}),
]