mirror of
https://github.com/continew-org/continew-admin-ui.git
synced 2025-09-09 08:57:14 +08:00
first commit
This commit is contained in:
13
config/plugins/svg-icon.ts
Normal file
13
config/plugins/svg-icon.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
import path from 'node:path'
|
||||
import process from 'node:process'
|
||||
import { createSvgIconsPlugin } from 'vite-plugin-svg-icons'
|
||||
|
||||
export default function createSvgIcon(isBuild) {
|
||||
return createSvgIconsPlugin({
|
||||
// 指定需要缓存的图标文件夹
|
||||
iconDirs: [path.resolve(process.cwd(), 'src/assets/icons')],
|
||||
// 指定 symbolId 格式
|
||||
symbolId: 'icon-[dir]-[name]',
|
||||
svgoOptions: isBuild,
|
||||
})
|
||||
}
|
Reference in New Issue
Block a user