nvj-turnierplaner2/vite.config.ts
2026-01-23 10:41:19 +01: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: 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"],
},
}));