Files
JamBuddy/vite.config.js
T
vadimwit fab385a612 fix(dev): pin dev server, wait-on gate, and Electron loadURL to 127.0.0.1
With plain localhost, node >=17 can bind the Vite dev server to ::1
only; on this machine IPv4/IPv6 loopback mismatch made the browser,
wait-on, and the Electron window all see connection-refused while Vite
reported ready. Explicit 127.0.0.1 on all three ends fixes dev startup
(user-verified: electron:dev window now opens).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-09 23:40:44 +01:00

18 lines
513 B
JavaScript

import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import tailwindcss from '@tailwindcss/vite'
export default defineConfig({
plugins: [react(), tailwindcss()],
base: './', // relative paths so Electron can load files from disk
server: {
// Explicit IPv4 bind: with plain `localhost`, node ≥17 can bind ::1 only,
// which browsers/wait-on may fail to reach (seen on Windows + node 24).
host: '127.0.0.1',
port: 5173,
},
build: {
outDir: 'dist',
},
})