import { defineConfig } from "vite"; import vue from "@vitejs/plugin-vue"; import tailwindcss from "@tailwindcss/vite"; import Icons from "unplugin-icons/vite"; import { fileURLToPath, URL } from "node:url"; const host = process.env.TAURI_DEV_HOST; export default defineConfig(async () => ({ plugins: [ vue(), tailwindcss(), Icons({ compiler: "vue3" }), ], resolve: { alias: { "@": fileURLToPath(new URL("./src", import.meta.url)), }, }, build: { target: "esnext", cssCodeSplit: false, rollupOptions: { output: { manualChunks: { vendor: ["vue", "vue-router", "pinia"], }, }, }, }, clearScreen: false, server: { port: 1420, strictPort: true, host: host || false, hmr: host ? { protocol: "ws", host, port: 1421, } : undefined, watch: { ignored: ["**/src-tauri/**"], }, }, }));