Skip to content

KotlinViteConfig

The configuration block with options specific to the Kotlin Multiplatform projects.

Properties

autoRewriteIndex

@get:



Internal



abstract val autoRewriteIndex: Property<Boolean>

base

@get:



Internal



abstract val base: Property<String>

build

abstract val build: ViteBuildConfig

cacheDir

@get:



Internal



abstract val cacheDir: Property<String>

disabledTargets

open fun disabledTargets(vararg targets: String)
@get:



Internal



abstract val disabledTargets: ListProperty<String>

A list of targets names that should not be configured by the Vite plugin.

Example
vite {
    disabledTargets("wasmJs")
}

plugins

@get:



Internal



abstract val plugins: ListProperty<ExternalVitePlugin>

publicDir

@get:



Internal



abstract val publicDir: Property<String>

root

@get:



Internal



abstract val root: DirectoryProperty

server

abstract val server: ViteServerConfig

version

@get:



Internal



abstract val version: Property<String>

Functions

build

open fun build(block: ViteBuildConfig.() -> Unit): ViteBuildConfig

localPlugin

open fun localPlugin(
    path: String, 
    exportedAs: String, 
    version: String, 
    configuration: String?, 
    isNamedExport: Boolean
)

plugin

open fun plugin(
    packageName: String, 
    exportedAs: String, 
    version: String, 
    configuration: String?, 
    isNamedExport: Boolean, 
    isLocal: Boolean
)

server

open fun server(block: ViteServerConfig.() -> Unit): ViteServerConfig

setDefaults

open fun setDefaults()

setDefaultsFrom

open fun setDefaultsFrom(other: ViteConfig)