svg-icon.js 313 B

1234567891011
  1. import { createSvgIconsPlugin } from 'vite-plugin-svg-icons'
  2. import path from 'path'
  3. export default function createSvgIcon(isBuild) {
  4. return createSvgIconsPlugin({
  5. iconDirs: [path.resolve(process.cwd(), 'src/assets/icons/svg')],
  6. symbolId: 'icon-[dir]-[name]',
  7. svgoOptions: isBuild
  8. })
  9. }