12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- import { fileURLToPath, URL } from 'node:url'
- import { defineConfig } from 'vite'
- import { createSvgIconsPlugin } from '@digitalacorn/vite-plugin-svg-icons'
- import vue from '@vitejs/plugin-vue'
- import vueJsx from '@vitejs/plugin-vue-jsx'
- import VueDevTools from 'vite-plugin-vue-devtools'
- import path from 'path'
- // https://vitejs.dev/config/
- export default defineConfig({
- base: './',
- plugins: [
- vue(),
- vueJsx(),
- VueDevTools(),
- createSvgIconsPlugin({
- iconDirs: [path.resolve(process.cwd(), 'src/assets/svgs')],
-
- symbolId: 'icon-[dir]-[name]',
-
- svgoOptions: true,
- replaceStrokeWithCurrentColor: false
- }),
- ],
- resolve: {
- alias: {
- '@': fileURLToPath(new URL('./src', import.meta.url))
- },
- extensions: ['.mjs', '.js', '.ts', '.jsx', '.tsx', '.json', '.vue']
- },
- css: {
- preprocessorOptions: {
- scss: {
- additionalData: `
- @import "@/assets/styles/mixins.scss";
- @import "@/assets/styles/variables.scss";`
- }
- }
- },
- server: {
- host: '0.0.0.0'
- },
- })
|