Skip to content

ViteBuildConfig

interface ViteBuildConfig

Rollup configuration.

vite {
    build {
        // …
    }
}

Properties

modulePreload

@get:



Internal



abstract val modulePreload: Property<Boolean>

Whether to automatically inject a module preload polyfill.

Currently, does not support the resolveDependencies function.

Example
vite {
    build {
        modulePreload.set(false)
    }
}
External resources

outDir

@get:



Internal



abstract val outDir: DirectoryProperty

Output directory of the production build.

Example
vite {
    build {
        outDir.set(project.layout.buildDirectory.dir("dist"))
    }
}
External resources

target

@get:



Internal



abstract val target: Property<String>

Browser compatibility target for the final bundle.

For more information, see the official documentation.

Example
vite {
    build {
        target.set("es2015")
    }
}
External resources