123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- import {
- defineConfig
- } from 'vite'
- import vue from '@vitejs/plugin-vue'
- import path from 'path'
- import AutoImport from 'unplugin-auto-import/vite'
- import Components from 'unplugin-vue-components/vite'
- import {
- ElementPlusResolver
- } from 'unplugin-vue-components/resolvers'
- // https://vitejs.dev/config/
-
-
- import {
- createSvgIconsPlugin
- } from "vite-plugin-svg-icons"
-
-
- export default defineConfig({
- plugins: [
- vue(),
- AutoImport({
- resolvers: [ElementPlusResolver()],
- }),
- Components({
- resolvers: [ElementPlusResolver()],
- }),
- createSvgIconsPlugin({
- iconDirs: [path.resolve(process.cwd(), "src/assets/icons")],
- symbolId: "icon-[dir]-[name]",
- }),
- ],
- base: './',
- resolve: {
- alias: {
- '@/public': path.resolve('./public'),
- '@/src': path.resolve('./src'),
- '@/views': path.resolve('./src/views'),
- '@/tools': path.resolve('./src/tools'),
- '@/axios': path.resolve('./src/axios'),
- '@/stores': path.resolve('./src/stores'),
- '@/router': path.resolve('./src/router'),
- '@/style': path.resolve('./src/style'),
- '@/assets': path.resolve('./src/assets'),
- '@/components': path.resolve('./src/components'),
- }
- }
- })
|