dev-resources.site
for different kinds of informations.
Change your Sveltekit (or any vite-powered) dev server localhost port
Published at
8/27/2024
Categories
vite
sveltekit
localhost
svelte
Author
Abdullah Bashir
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.
Articles
12 articles in total
From Svelte 4 to Svelte 5: Understanding Slots (default and named)
read article
Make EditorJS work in Svelte(kit) SSR
read article
New Post here!🍻
read article
A short guide to Async Components in Svelte 5
read article
Running a Function When an #await Block resolves in Svelte(Kit)
read article
How to Compare (diff) two Objects
read article
Calling a SvelteKit form action (or submitting a form) from a component
read article
Fix for EPERM: operation not permitted (...$types.d.ts)
read article
Change your Sveltekit (or any vite-powered) dev server localhost port
currently reading
Run your Sveltekit (or any vite) localhost server with HTTPS
read article
Prisma db push or pull stuck?
read article
Prisma migration stuck?
read article
Featured ones: