Closed JobinJia closed 2 years ago
// in build.js
const svgIconsPlugin = require('vite-plugin-svg-icons') const config = defineConfig({ plugins: [ vue(), vueJsx(), configSvgIconsPlugin({ iconDirs: [path.resolve(process.cwd(), 'src/assets/icons')], svgoOptions: true, // default symbolId: 'icon-[dir]-[name]', }) ], })
Try one of these:
const { default: svgIconsPlugin } = require('vite-plugin-svg-icons')
const svgIconsPlugin = require('vite-plugin-svg-icons').default
// in build.js