import { defineConfig } from "vite"; import { VitePWA } from "vite-plugin-pwa"; import vue from "@vitejs/plugin-vue"; import dotenv from "dotenv"; import { loadAppConfig } from "./vite.config.utils"; // Load environment variables from .env file dotenv.config(); // Load application configuration const appConfig = loadAppConfig(); export default defineConfig({ server: { port: process.env.VITE_PORT || 8080, }, plugins: [ vue(), VitePWA({ ...appConfig.pwaConfig, }), ], resolve: { alias: appConfig.aliasConfig, }, });