Vite for Gradle
General purpose Gradle plugin to use Vite without preconfigured behavior.
Use Vite in your own terms
Use this plugin to integrate Vite into your build processes exactly how you want it.
To avoid manually configuring Vite, use one of the other modules in this project, which are pre-configured to be compatible with other parts of the Gradle ecosystem.
Usage
Import the plugin in your build script:
// build.gradle.kts
plugins {
id("dev.opensavvy.vite.base") version "<add the version here>"
}
Content copied to clipboard
The plugin automatically creates the vite
extension block, but it creates no tasks nor other behavior. To access it, use the viteConfig
accessor.
Task types
This plugin exposes multiple task types that you can use to create your own build.
WriteConfig
: generate thevite.config.js
file.ViteExec
: execute a Vite command.
Note that it is the user's responsibility to install Vite and other dependencies.