+port
Vike's +port
setting is an alias for setting Vite's server.port and preview.port.
This:
// +config.ts
import type { Config } from 'vike/types'
export default {
port: 1234
} satisfies Config
Is equivalent to that:
// vite.config.ts
import type { UserConfig } from 'vite'
export default {
server: {
port: 1234
},
preview: {
port: 1234
}
} satisfies UserConfig
If you want to set two different values between development and preview, then set the values over vite.config.js
instead of using +port
.