import { defineConfig } from "vite"; import react from "@vitejs/plugin-react-swc"; import path from "path"; // https://vitejs.dev/config/ export default defineConfig(() => ({ server: { host: "::", port: 8080, hmr: { overlay: false, }, }, plugins: [react()], resolve: { alias: { "@": path.resolve(__dirname, "./src"), }, // Prevent multiple React copies (common cause of: Cannot read properties of null (reading 'useEffect')) dedupe: ["react", "react-dom", "react/jsx-runtime", "react/jsx-dev-runtime"], }, }));