19 lines
664 B
TypeScript
19 lines
664 B
TypeScript
import { sveltekit } from '@sveltejs/kit/vite';
|
|
import { defineConfig } from 'vite';
|
|
|
|
export default defineConfig({
|
|
plugins: [sveltekit()],
|
|
server: {
|
|
host: true, // listen on 0.0.0.0 so reachable from host (e.g. dev container, port forward)
|
|
port: 5173,
|
|
strictPort: false,
|
|
// Disable HMR WebSocket when using port forwarding (e.g. dev container); the tunnel
|
|
// often doesn't proxy WebSockets, causing repeated connection failures in the console.
|
|
// With csr: false we don't use client-side HMR anyway—refresh the page to see changes.
|
|
hmr: false,
|
|
},
|
|
preview: {
|
|
host: true,
|
|
},
|
|
});
|