import path from "path"; import { defineConfig } from "vite"; export default defineConfig({ resolve: { alias: { "@go": path.resolve(__dirname, "wailsjs/go"), "@components": path.resolve(__dirname, "src/components"), "@assets": path.resolve(__dirname, "src/assets"), "@pages": path.resolve(__dirname, "src/pages"), "@runtime": path.resolve(__dirname, "wailsjs/runtime"), "@utils": path.resolve(__dirname, "src/utils"), "@store": path.resolve(__dirname, "src/store"), }, }, build: { // The bundled icons must be emitted as files, not inlined. // Vite inlines any asset under 4 kB, and 63 of the 64 icons are // under 4 kB, so the default put ~96 kB of base64 into the main // chunk — parsed at startup, for icons most views never render. // As files they are served same-origin (so still offline) and // fetched on first use. assetsInlineLimit: (filePath: string) => filePath.includes('/assets/icons/fa/') ? false : undefined, rollupOptions: { input: { main: "index.html", }, }, }, server: { hmr: { host: 'localhost', protocol: 'ws', }, }, });