You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
530 B
22 lines
530 B
import { defineConfig } from 'vite'
|
|
import vue from '@vitejs/plugin-vue'
|
|
import path from 'path'
|
|
import { createSvgIconsPlugin } from 'vite-plugin-svg-icons'
|
|
|
|
export default defineConfig({
|
|
plugins: [
|
|
vue(),
|
|
createSvgIconsPlugin({
|
|
// 指定需要缓存的图标文件夹
|
|
iconDirs: [path.resolve(process.cwd(), 'src/assets/svg/icons')],
|
|
// 指定symbolId格式
|
|
symbolId: 'icon-[name]'
|
|
})
|
|
],
|
|
resolve: {
|
|
alias: {
|
|
'@': path.resolve(__dirname, 'src') // 利用@代替src
|
|
}
|
|
}
|
|
})
|