I need to config server port for Nuxt3. I try to do it so:
nuxt.config.ts
import { defineNuxtConfig } from 'nuxt3'
export default defineNuxtConfig(
vite: {
server: {
port: 5000,
},
},
})
But it doesn't work. How to set server port in Nuxt3?
import { defineNuxtConfig } from 'nuxt'
(no need fornuxt3
). As shown here: nuxtjs.org/announcements/nuxt3-rc/#vite--webpack – Backcross