import react from "@vitejs/plugin-react";
import { defineConfig } from "vite";
import { join } from "path";

const srcRoot = join(__dirname, "src/vite");

export default defineConfig({
  root: srcRoot,
  base: "./",
  plugins: [react()],
  build: {
    outDir: join(srcRoot, "../../dist"),
    emptyOutDir: true,
  },
  server: {
    host: true,
    port: 8080,
  },
  optimizeDeps: {
    exclude: ["path"],
  },
});
