+host
Vike's +host setting is just an alias for Vite's CLI --host option (which sets Vite's server.host and preview.host configuration).
This:
// +config.js
export default {
host: true
}// +config.ts
import type { Config } from 'vike/types'
export default {
host: true
} satisfies ConfigIs equivalent to that:
// vite.config.js
export default {
server: {
host: true
},
preview: {
host: true
}
}// vite.config.ts
import type { Config } from 'vike/types'
export default {
server: {
host: true
},
preview: {
host: true
}
} satisfies ConfigIf you want to set two different values between development and preview, then set the values over vite.config.js instead of using +host.