Skip to content

Vite for Gradleopensavvy.gradle.vite.base.configViteServerConfig

ViteServerConfig

interface ViteServerConfig

Development server options.

vite {
   server {
       // …
   }
}

Properties

host

@get:
Internal
abstract val host: Property<String>

Specify which IP addresses the server should listen on.

port

@get:
Internal
abstract val port: Property<Int>

Specify server port.

proxies

@get:
Internal
abstract val proxies: ListProperty<ProxyOptions>

Configures the proxies started by the Vite development server.

strictPort

@get:
Internal
abstract val strictPort: Property<Boolean>

Set to true to exit if port is already in use, instead of automatically trying the next available port.

Functions

proxy

open fun proxy(url: String, target: String, changeOrigin: Boolean = false, ws: Boolean = false, replacePrefixBy: String? = null)

Configures the proxies started by the Vite development server.