Spaces:
Running
Running
| import { fileURLToPath, URL } from 'node:url' | |
| import { defineConfig } from 'vite' | |
| import vue from '@vitejs/plugin-vue' | |
| import vueDevTools from 'vite-plugin-vue-devtools' | |
| import { createSvgIconsPlugin } from "vite-plugin-svg-icons"; | |
| import path from "node:path"; | |
| // https://vite.dev/config/ | |
| export default defineConfig({ | |
| plugins: [ | |
| vue(), | |
| vueDevTools(), | |
| createSvgIconsPlugin({ | |
| customDomId: '__svg__icons__dom__', | |
| iconDirs: [path.resolve(process.cwd(), 'src/assets/svg')], | |
| // symbolId: 'icon-[name]' | |
| symbolId: 'icon-[dir]-[name]' | |
| }) | |
| ], | |
| resolve: { | |
| alias: { | |
| '@': fileURLToPath(new URL('./src', import.meta.url)), | |
| '@plugin': fileURLToPath(new URL('./src', import.meta.url)), | |
| }, | |
| }, | |
| }) | |