My dev server runs on 5173 by default. Let's say I wanted to change it to 5199:
import { sveltekit } from '@sveltejs/kit/vite';
import { defineConfig } from 'vite';
import fs from 'fs';
export default defineConfig({
plugins: [sveltekit()],
// Added Config Part
server: {
port: 5199
}
// Added Config Part End
});
It works!
Happy hacking!
PS: Relevant docs
PS2: Run your sveltekit (or any vite-powered) localhost dev server with HTTPS.