Files
2026-04-29 10:32:05 +02:00

23 lines
566 B
TypeScript

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: 5173,
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"],
},
}));