tauri-apps / create-tauri-app

Rapidly scaffold out a new tauri app project.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

`--port` argument is ignored when running `pnpm tauri dev`

samrat opened this issue · comments

pnpm tauri dev accepts a --port argument but because of the way create-tauri-app sets up the Vite config(for example, the one for Svelte), the passed argument is ignored.

--port is an option for the CLI internal devServer which is only used when you're not using a devServer on your own, but in your case, you're using vite.

If you want to change the port, then you need to change it in your vite.conf.json then in tauri.conf.json