Change your Sveltekit (or any vite-powered) dev server localhost port

Abdullah Bashir - Aug 27 - - Dev Community

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
});
Enter fullscreen mode Exit fullscreen mode

It works!

5199

Happy hacking!

PS: Relevant docs
PS2: Run your sveltekit (or any vite-powered) localhost dev server with HTTPS.

. . . . . . . . . . . . .
Terabox Video Player