import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
import path from "node:path";
export default () => {
  return defineConfig({
    host: "0.0.0.0",
    port: process.env.VITE_DEV_PORT ?? 5173,
    plugins: [react()],
    server: {
      host: "0.0.0.0",
      hmr: {
        protocol: process.env.VITE_DEV_PROTOCOL ?? "ws",
      },
    },
    build: {
      outDir: "./dist",
    },
    resolve: {
      alias: {
        "@": path.resolve("./src"),
      },
    },
  });
};
